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(); }
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; }
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(); }
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; }
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; }
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; }
private void HandleTaskUpdatedEvent(TaskUpdatedEvent @event) { JobHistoryParser.TaskInfo taskInfo = info.tasksMap[@event.GetTaskId()]; taskInfo.finishTime = @event.GetFinishTime(); }