Class JobHistoryCopyService
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.mapreduce.jobhistory.JobHistoryCopyService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler,org.apache.hadoop.service.Service
public class JobHistoryCopyService
extends org.apache.hadoop.service.CompositeService
implements org.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler
Reads in history events from the JobHistoryFile and sends them out again
to be recorded.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
ConstructorsConstructorDescriptionJobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event> handler) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.fs.FSDataInputStreamgetPreviousJobHistoryFileStream(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) voidhandleEvent(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceStopMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
JobHistoryCopyService
public JobHistoryCopyService(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event> handler)
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
handleEvent
public void handleEvent(org.apache.hadoop.mapreduce.jobhistory.HistoryEvent event) throws IOException - Specified by:
handleEventin interfaceorg.apache.hadoop.mapreduce.jobhistory.HistoryEventHandler- Throws:
IOException
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
getPreviousJobHistoryFileStream
public static org.apache.hadoop.fs.FSDataInputStream getPreviousJobHistoryFileStream(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) throws IOException - Throws:
IOException
-