public class JobHistoryEventHandler extends org.apache.hadoop.service.AbstractService implements org.apache.hadoop.yarn.event.EventHandler<JobHistoryEvent>
| Modifier and Type | Class and Description |
|---|---|
protected class |
JobHistoryEventHandler.MetaInfo |
| Modifier and Type | Field and Description |
|---|---|
protected Thread |
eventHandlingThread |
protected BlockingQueue<JobHistoryEvent> |
eventQueue |
protected static Map<org.apache.hadoop.mapreduce.v2.api.records.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(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId) |
void |
closeWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId id)
Close the event writer for this id
|
org.codehaus.jackson.JsonNode |
countersToJSON(org.apache.hadoop.mapreduce.Counters counters) |
protected org.apache.hadoop.mapreduce.jobhistory.EventWriter |
createEventWriter(org.apache.hadoop.fs.Path historyFilePath) |
void |
handle(JobHistoryEvent event) |
void |
handleEvent(JobHistoryEvent event) |
protected void |
processDoneFiles(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId) |
void |
processEventForJobSummary(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event,
JobSummary summary,
org.apache.hadoop.mapreduce.v2.api.records.JobId jobId) |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setForcejobCompletion(boolean forceJobCompletion) |
protected void |
setupEventWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId,
String forcedJobStateOnShutDown)
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<org.apache.hadoop.mapreduce.v2.api.records.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(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionprotected org.apache.hadoop.mapreduce.jobhistory.EventWriter createEventWriter(org.apache.hadoop.fs.Path historyFilePath)
throws IOException
IOExceptionprotected void setupEventWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId,
String forcedJobStateOnShutDown)
throws IOException
jobId - the jobId.forcedJobStateOnShutDown - IOExceptionpublic void closeWriter(org.apache.hadoop.mapreduce.v2.api.records.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,
org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
@InterfaceAudience.Private public org.codehaus.jackson.JsonNode countersToJSON(org.apache.hadoop.mapreduce.Counters counters)
protected void closeEventWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
throws IOException
IOExceptionprotected void processDoneFiles(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
throws IOException
IOExceptionpublic void setForcejobCompletion(boolean forceJobCompletion)
Copyright © 2015 Apache Software Foundation. All Rights Reserved.