public class JobHistoryEventHandler extends AbstractService implements org.apache.hadoop.yarn.event.EventHandler<JobHistoryEvent>
| Modifier and Type | Class and Description |
|---|---|
protected class |
JobHistoryEventHandler.MetaInfo |
Service.STATE| Modifier and Type | Field and Description |
|---|---|
protected Thread |
eventHandlingThread |
protected BlockingQueue<JobHistoryEvent> |
eventQueue |
protected static Map<JobId,JobHistoryEventHandler.MetaInfo> |
fileMap |
protected boolean |
forceJobCompletion |
protected org.apache.hadoop.yarn.client.api.TimelineClient |
timelineClient |
| Constructor and Description |
|---|
JobHistoryEventHandler(AppContext context,
int startCount) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeEventWriter(JobId jobId) |
void |
closeWriter(JobId id)
Close the event writer for this id
|
org.codehaus.jackson.JsonNode |
countersToJSON(Counters counters) |
protected org.apache.hadoop.mapreduce.jobhistory.EventWriter |
createEventWriter(Path historyFilePath) |
void |
handle(JobHistoryEvent event) |
void |
handleEvent(JobHistoryEvent event) |
protected void |
processDoneFiles(JobId jobId) |
void |
processEventForJobSummary(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event,
JobSummary summary,
JobId jobId) |
protected void |
serviceInit(Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setForcejobCompletion(boolean forceJobCompletion) |
protected void |
setupEventWriter(JobId jobId,
org.apache.hadoop.mapreduce.jobhistory.AMStartedEvent amStartedEvent)
Create an event writer for the Job represented by the jobID.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected BlockingQueue<JobHistoryEvent> eventQueue
protected Thread eventHandlingThread
protected static final Map<JobId,JobHistoryEventHandler.MetaInfo> fileMap
protected volatile boolean forceJobCompletion
protected org.apache.hadoop.yarn.client.api.TimelineClient timelineClient
public JobHistoryEventHandler(AppContext context, int startCount)
protected void serviceInit(Configuration conf) throws Exception
serviceInit in class AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class AbstractServiceExceptionprotected org.apache.hadoop.mapreduce.jobhistory.EventWriter createEventWriter(Path historyFilePath) throws IOException
IOExceptionprotected void setupEventWriter(JobId jobId, org.apache.hadoop.mapreduce.jobhistory.AMStartedEvent amStartedEvent) throws IOException
jobId - the jobId.amStartedEvent - IOExceptionpublic void closeWriter(JobId id) throws IOException
IOExceptionpublic void handle(JobHistoryEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<JobHistoryEvent>@InterfaceAudience.Private public void handleEvent(JobHistoryEvent event)
public void processEventForJobSummary(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event, JobSummary summary, JobId jobId)
@InterfaceAudience.Private public org.codehaus.jackson.JsonNode countersToJSON(Counters counters)
protected void closeEventWriter(JobId jobId) throws IOException
IOExceptionprotected void processDoneFiles(JobId jobId) throws IOException
IOExceptionpublic void setForcejobCompletion(boolean forceJobCompletion)
Copyright © 2018 CERN. All Rights Reserved.