/// <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.");
            }
        }
 /// <exception cref="System.IO.IOException"/>
 public virtual void ContainerStarted(ContainerStartData containerStart)
 {
     FileSystemApplicationHistoryStore.HistoryFileWriter hfWriter = GetHistoryFileWriter
                                                                        (containerStart.GetContainerId().GetApplicationAttemptId().GetApplicationId());
     System.Diagnostics.Debug.Assert(containerStart is ContainerStartDataPBImpl);
     try
     {
         hfWriter.WriteHistoryData(new FileSystemApplicationHistoryStore.HistoryDataKey(containerStart
                                                                                        .GetContainerId().ToString(), StartDataSuffix), ((ContainerStartDataPBImpl)containerStart
                                                                                                                                         ).GetProto().ToByteArray());
         Log.Info("Start information of container " + containerStart.GetContainerId() + " is written"
                  );
     }
     catch (IOException e)
     {
         Log.Error("Error when writing start information of container " + containerStart.GetContainerId
                       (), e);
         throw;
     }
 }