Search in sources :

Example 1 with TaskAttemptStartedEvent

use of org.apache.hadoop.mapreduce.jobhistory.TaskAttemptStartedEvent in project hadoop by apache.

the class TaskAttemptImpl method sendLaunchedEvents.

@SuppressWarnings("unchecked")
private void sendLaunchedEvents() {
    JobCounterUpdateEvent jce = new JobCounterUpdateEvent(attemptId.getTaskId().getJobId());
    jce.addCounterUpdate(attemptId.getTaskId().getTaskType() == TaskType.MAP ? JobCounter.TOTAL_LAUNCHED_MAPS : JobCounter.TOTAL_LAUNCHED_REDUCES, 1);
    eventHandler.handle(jce);
    LOG.info("TaskAttempt: [" + attemptId + "] using containerId: [" + container.getId() + " on NM: [" + StringInterner.weakIntern(container.getNodeId().toString()) + "]");
    TaskAttemptStartedEvent tase = new TaskAttemptStartedEvent(TypeConverter.fromYarn(attemptId), TypeConverter.fromYarn(attemptId.getTaskId().getTaskType()), launchTime, trackerName, httpPort, shufflePort, container.getId(), locality.toString(), avataar.toString());
    eventHandler.handle(new JobHistoryEvent(attemptId.getTaskId().getJobId(), tase));
}
Also used : JobHistoryEvent(org.apache.hadoop.mapreduce.jobhistory.JobHistoryEvent) JobCounterUpdateEvent(org.apache.hadoop.mapreduce.v2.app.job.event.JobCounterUpdateEvent) TaskAttemptStartedEvent(org.apache.hadoop.mapreduce.jobhistory.TaskAttemptStartedEvent)

Aggregations

JobHistoryEvent (org.apache.hadoop.mapreduce.jobhistory.JobHistoryEvent)1 TaskAttemptStartedEvent (org.apache.hadoop.mapreduce.jobhistory.TaskAttemptStartedEvent)1 JobCounterUpdateEvent (org.apache.hadoop.mapreduce.v2.app.job.event.JobCounterUpdateEvent)1