public JobHistoryEvent(JobId jobID, HistoryEvent historyEvent, long timestamp) { super(historyEvent.getEventType(), timestamp); this.jobID = jobID; this.historyEvent = historyEvent; }
public JobHistoryEvent(JobId jobID, HistoryEvent historyEvent, long timestamp) { super(historyEvent.getEventType(), timestamp); this.jobID = jobID; this.historyEvent = historyEvent; }
public JobHistoryEvent(JobId jobID, HistoryEvent historyEvent, long timestamp) { super(historyEvent.getEventType(), timestamp); this.jobID = jobID; this.historyEvent = historyEvent; }
private boolean isJobCompletionEvent(HistoryEvent historyEvent) { if (EnumSet.of(EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { return true; } return false; }
private boolean isJobCompletionEvent(HistoryEvent historyEvent) { if (EnumSet.of(EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { return true; } return false; }
private boolean isJobCompletionEvent(HistoryEvent historyEvent) { if (EnumSet.of(EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { return true; } return false; }
void processEventForFlush(HistoryEvent historyEvent) throws IOException { if (EnumSet.of(EventType.MAP_ATTEMPT_FINISHED, EventType.MAP_ATTEMPT_FAILED, EventType.MAP_ATTEMPT_KILLED, EventType.REDUCE_ATTEMPT_FINISHED, EventType.REDUCE_ATTEMPT_FAILED, EventType.REDUCE_ATTEMPT_KILLED, EventType.TASK_FINISHED, EventType.TASK_FAILED, EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { numUnflushedCompletionEvents++; if (!isTimerActive) { resetFlushTimer(); if (!isTimerShutDown) { flushTimerTask = new FlushTimerTask(this); flushTimer.schedule(flushTimerTask, flushTimeout); isTimerActive = true; } } } }
void processEventForFlush(HistoryEvent historyEvent) throws IOException { if (EnumSet.of(EventType.MAP_ATTEMPT_FINISHED, EventType.MAP_ATTEMPT_FAILED, EventType.MAP_ATTEMPT_KILLED, EventType.REDUCE_ATTEMPT_FINISHED, EventType.REDUCE_ATTEMPT_FAILED, EventType.REDUCE_ATTEMPT_KILLED, EventType.TASK_FINISHED, EventType.TASK_FAILED, EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { numUnflushedCompletionEvents++; if (!isTimerActive) { resetFlushTimer(); if (!isTimerShutDown) { flushTimerTask = new FlushTimerTask(this); flushTimer.schedule(flushTimerTask, flushTimeout); isTimerActive = true; } } } }
void processEventForFlush(HistoryEvent historyEvent) throws IOException { if (EnumSet.of(EventType.MAP_ATTEMPT_FINISHED, EventType.MAP_ATTEMPT_FAILED, EventType.MAP_ATTEMPT_KILLED, EventType.REDUCE_ATTEMPT_FINISHED, EventType.REDUCE_ATTEMPT_FAILED, EventType.REDUCE_ATTEMPT_KILLED, EventType.TASK_FINISHED, EventType.TASK_FAILED, EventType.JOB_FINISHED, EventType.JOB_FAILED, EventType.JOB_KILLED).contains(historyEvent.getEventType())) { numUnflushedCompletionEvents++; if (!isTimerActive) { resetFlushTimer(); if (!isTimerShutDown) { flushTimerTask = new FlushTimerTask(this); flushTimer.schedule(flushTimerTask, flushTimeout); isTimerActive = true; } } } }
synchronized void write(HistoryEvent event) throws IOException { Event wrapper = new Event(); wrapper.type = event.getEventType(); wrapper.event = event.getDatum(); writer.write(wrapper, encoder); encoder.flush(); out.writeBytes("\n"); }
synchronized void write(HistoryEvent event) throws IOException { Event wrapper = new Event(); wrapper.type = event.getEventType(); wrapper.event = event.getDatum(); writer.write(wrapper, encoder); encoder.flush(); out.writeBytes("\n"); }
synchronized void write(HistoryEvent event) throws IOException { Event wrapper = new Event(); wrapper.type = event.getEventType(); wrapper.event = event.getDatum(); writer.write(wrapper, encoder); encoder.flush(); out.writeBytes("\n"); }
synchronized void write(HistoryEvent event) throws IOException { Event wrapper = new Event(); wrapper.setType(event.getEventType()); wrapper.setEvent(event.getDatum()); writer.write(wrapper, encoder); encoder.flush(); if (this.jsonOutput) { out.writeBytes("\n"); } }
private void handleTimelineEvent(JobHistoryEvent event) { HistoryEvent historyEvent = event.getHistoryEvent(); if (handleTimelineEvent) { if (timelineV2Client != null) { processEventForNewTimelineService(historyEvent, event.getJobID(), event.getTimestamp()); } else if (timelineClient != null) { processEventForTimelineServer(historyEvent, event.getJobID(), event.getTimestamp()); } } if (LOG.isDebugEnabled()) { LOG.debug("In HistoryEventHandler, handle timelineEvent:" + event.getHistoryEvent().getEventType()); } }
synchronized void write(HistoryEvent event) throws IOException { Event wrapper = new Event(); wrapper.type = event.getEventType(); wrapper.event = event.getDatum(); writer.write(wrapper, encoder); encoder.flush(); out.writeBytes("\n"); }
@Override public void handle(JobHistoryEvent event) { if (event.getHistoryEvent().getEventType() == EventType.JOB_INITED) { JobInitedEvent jie = (JobInitedEvent) event.getHistoryEvent(); jobLaunchTime.set(jie.getLaunchTime()); } super.handle(event); } };
if (event.getEventType() == EventType.AM_STARTED) { if (!amStartedEventsBegan) {
if (event.getEventType() == EventType.AM_STARTED) { if (!amStartedEventsBegan) {
if (event.getEventType() == EventType.AM_STARTED) { if (!amStartedEventsBegan) {
private org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity createTaskEntity(HistoryEvent event, long timestamp, String taskId, String entityType, String relatedJobEntity, JobId jobId, boolean setCreatedTime, long taskIdPrefix) { org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity entity = createBaseEntity(event, timestamp, entityType, setCreatedTime); entity.setId(taskId); if (event.getEventType() == EventType.TASK_STARTED) { entity.addInfo("TASK_TYPE", ((TaskStartedEvent)event).getTaskType().toString()); } entity.addIsRelatedToEntity(relatedJobEntity, jobId.toString()); entity.setIdPrefix(taskIdPrefix); return entity; }