public class JobHistoryEventHandler extends org.apache.hadoop.yarn.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 |
| 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
|
protected org.apache.hadoop.mapreduce.jobhistory.EventWriter |
createEventWriter(org.apache.hadoop.fs.Path historyFilePath) |
void |
handle(JobHistoryEvent event) |
protected void |
handleEvent(JobHistoryEvent event) |
void |
init(org.apache.hadoop.conf.Configuration conf) |
void |
processEventForJobSummary(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event,
JobSummary summary,
org.apache.hadoop.mapreduce.v2.api.records.JobId jobId) |
void |
setForcejobCompletion(boolean forceJobCompletion) |
protected void |
setupEventWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
Create an event writer for the Job represented by the jobID.
|
void |
start() |
void |
stop() |
protected 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
public JobHistoryEventHandler(AppContext context, int startCount)
public void init(org.apache.hadoop.conf.Configuration conf)
init in interface org.apache.hadoop.yarn.service.Serviceinit in class org.apache.hadoop.yarn.service.AbstractServicepublic void start()
start in interface org.apache.hadoop.yarn.service.Servicestart in class org.apache.hadoop.yarn.service.AbstractServicepublic void stop()
stop in interface org.apache.hadoop.yarn.service.Servicestop in class org.apache.hadoop.yarn.service.AbstractServiceprotected 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)
throws IOException
jobId - the jobId.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>protected 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)
protected void closeEventWriter(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
throws IOException
IOExceptionpublic void setForcejobCompletion(boolean forceJobCompletion)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.