Exemple #1
0
 private void ConstructTaskAttemptReport()
 {
     report = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <TaskAttemptReport>();
     report.SetTaskAttemptId(attemptId);
     report.SetTaskAttemptState(state);
     report.SetProgress(GetProgress());
     report.SetStartTime(attemptInfo.GetStartTime());
     report.SetFinishTime(attemptInfo.GetFinishTime());
     report.SetShuffleFinishTime(attemptInfo.GetShuffleFinishTime());
     report.SetSortFinishTime(attemptInfo.GetSortFinishTime());
     if (localDiagMessage != null)
     {
         report.SetDiagnosticInfo(attemptInfo.GetError() + ", " + localDiagMessage);
     }
     else
     {
         report.SetDiagnosticInfo(attemptInfo.GetError());
     }
     // report.setPhase(attemptInfo.get); //TODO
     report.SetStateString(attemptInfo.GetState());
     report.SetCounters(TypeConverter.ToYarn(GetCounters()));
     report.SetContainerId(attemptInfo.GetContainerId());
     if (attemptInfo.GetHostname() == null)
     {
         report.SetNodeManagerHost("UNKNOWN");
     }
     else
     {
         report.SetNodeManagerHost(attemptInfo.GetHostname());
         report.SetNodeManagerPort(attemptInfo.GetPort());
     }
     report.SetNodeManagerHttpPort(attemptInfo.GetHttpPort());
 }