示例#1
0
 private void HandleTaskFinishedEvent(TaskFinishedEvent @event)
 {
     JobHistoryParser.TaskInfo taskInfo = info.tasksMap[@event.GetTaskId()];
     taskInfo.counters            = @event.GetCounters();
     taskInfo.finishTime          = @event.GetFinishTime();
     taskInfo.status              = TaskStatus.State.Succeeded.ToString();
     taskInfo.successfulAttemptId = @event.GetSuccessfulTaskAttemptId();
 }
示例#2
0
 private void HandleTaskStartedEvent(TaskStartedEvent @event)
 {
     JobHistoryParser.TaskInfo taskInfo = new JobHistoryParser.TaskInfo();
     taskInfo.taskId                   = @event.GetTaskId();
     taskInfo.startTime                = @event.GetStartTime();
     taskInfo.taskType                 = @event.GetTaskType();
     taskInfo.splitLocations           = @event.GetSplitLocations();
     info.tasksMap[@event.GetTaskId()] = taskInfo;
 }
示例#3
0
 private void HandleTaskFailedEvent(TaskFailedEvent @event)
 {
     JobHistoryParser.TaskInfo taskInfo = info.tasksMap[@event.GetTaskId()];
     taskInfo.status               = TaskStatus.State.Failed.ToString();
     taskInfo.finishTime           = @event.GetFinishTime();
     taskInfo.error                = StringInterner.WeakIntern(@event.GetError());
     taskInfo.failedDueToAttemptId = @event.GetFailedAttemptID();
     taskInfo.counters             = @event.GetCounters();
 }
示例#4
0
 private void HandleTaskAttemptFinishedEvent(TaskAttemptFinishedEvent @event)
 {
     JobHistoryParser.TaskInfo        taskInfo    = info.tasksMap[@event.GetTaskId()];
     JobHistoryParser.TaskAttemptInfo attemptInfo = taskInfo.attemptsMap[@event.GetAttemptId
                                                                             ()];
     attemptInfo.finishTime = @event.GetFinishTime();
     attemptInfo.status     = StringInterner.WeakIntern(@event.GetTaskStatus());
     attemptInfo.state      = StringInterner.WeakIntern(@event.GetState());
     attemptInfo.counters   = @event.GetCounters();
     attemptInfo.hostname   = StringInterner.WeakIntern(@event.GetHostname());
     info.completedTaskAttemptsMap[@event.GetAttemptId()] = attemptInfo;
 }
示例#5
0
        private void HandleTaskAttemptStartedEvent(TaskAttemptStartedEvent @event)
        {
            TaskAttemptID attemptId = @event.GetTaskAttemptId();

            JobHistoryParser.TaskInfo        taskInfo    = info.tasksMap[@event.GetTaskId()];
            JobHistoryParser.TaskAttemptInfo attemptInfo = new JobHistoryParser.TaskAttemptInfo
                                                               ();
            attemptInfo.startTime           = @event.GetStartTime();
            attemptInfo.attemptId           = @event.GetTaskAttemptId();
            attemptInfo.httpPort            = @event.GetHttpPort();
            attemptInfo.trackerName         = StringInterner.WeakIntern(@event.GetTrackerName());
            attemptInfo.taskType            = @event.GetTaskType();
            attemptInfo.shufflePort         = @event.GetShufflePort();
            attemptInfo.containerId         = @event.GetContainerId();
            taskInfo.attemptsMap[attemptId] = attemptInfo;
        }
示例#6
0
 private void HandleTaskAttemptFailedEvent(TaskAttemptUnsuccessfulCompletionEvent
                                           @event)
 {
     JobHistoryParser.TaskInfo taskInfo = info.tasksMap[@event.GetTaskId()];
     if (taskInfo == null)
     {
         Log.Warn("TaskInfo is null for TaskAttemptUnsuccessfulCompletionEvent" + " taskId:  "
                  + @event.GetTaskId().ToString());
         return;
     }
     JobHistoryParser.TaskAttemptInfo attemptInfo = taskInfo.attemptsMap[@event.GetTaskAttemptId
                                                                             ()];
     if (attemptInfo == null)
     {
         Log.Warn("AttemptInfo is null for TaskAttemptUnsuccessfulCompletionEvent" + " taskAttemptId:  "
                  + @event.GetTaskAttemptId().ToString());
         return;
     }
     attemptInfo.finishTime        = @event.GetFinishTime();
     attemptInfo.error             = StringInterner.WeakIntern(@event.GetError());
     attemptInfo.status            = StringInterner.WeakIntern(@event.GetTaskStatus());
     attemptInfo.hostname          = StringInterner.WeakIntern(@event.GetHostname());
     attemptInfo.port              = @event.GetPort();
     attemptInfo.rackname          = StringInterner.WeakIntern(@event.GetRackName());
     attemptInfo.shuffleFinishTime = @event.GetFinishTime();
     attemptInfo.sortFinishTime    = @event.GetFinishTime();
     attemptInfo.mapFinishTime     = @event.GetFinishTime();
     attemptInfo.counters          = @event.GetCounters();
     if (TaskStatus.State.Succeeded.ToString().Equals(taskInfo.status))
     {
         //this is a successful task
         if (attemptInfo.GetAttemptId().Equals(taskInfo.GetSuccessfulAttemptId()))
         {
             // the failed attempt is the one that made this task successful
             // so its no longer successful. Reset fields set in
             // handleTaskFinishedEvent()
             taskInfo.counters            = null;
             taskInfo.finishTime          = -1;
             taskInfo.status              = null;
             taskInfo.successfulAttemptId = null;
         }
     }
     info.completedTaskAttemptsMap[@event.GetTaskAttemptId()] = attemptInfo;
 }
示例#7
0
 private void HandleTaskUpdatedEvent(TaskUpdatedEvent @event)
 {
     JobHistoryParser.TaskInfo taskInfo = info.tasksMap[@event.GetTaskId()];
     taskInfo.finishTime = @event.GetFinishTime();
 }