private static void MergeContainerHistoryData(ContainerHistoryData historyData, ContainerStartData startData) { historyData.SetAllocatedResource(startData.GetAllocatedResource()); historyData.SetAssignedNode(startData.GetAssignedNode()); historyData.SetPriority(startData.GetPriority()); historyData.SetStartTime(startData.GetStartTime()); }
/// <exception cref="System.IO.IOException"/> public virtual void ContainerStarted(ContainerStartData containerStart) { ConcurrentMap <ContainerId, ContainerHistoryData> subMap = GetSubMap(containerStart .GetContainerId().GetApplicationAttemptId()); ContainerHistoryData oldData = subMap.PutIfAbsent(containerStart.GetContainerId() , ContainerHistoryData.NewInstance(containerStart.GetContainerId(), containerStart .GetAllocatedResource(), containerStart.GetAssignedNode(), containerStart.GetPriority (), containerStart.GetStartTime(), long.MaxValue, null, int.MaxValue, null)); if (oldData != null) { throw new IOException("The start information of container " + containerStart.GetContainerId () + " is already stored."); } }