public class JobHistoryCopyService extends CompositeService implements HistoryEventHandler
CompositeService.CompositeServiceShutdownHookService.STATESTOP_ONLY_STARTED_SERVICES| Constructor and Description |
|---|
JobHistoryCopyService(ApplicationAttemptId applicationAttemptId,
EventHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
static FSDataInputStream |
getPreviousJobHistoryFileStream(Configuration conf,
ApplicationAttemptId applicationAttemptId) |
void |
handleEvent(HistoryEvent event) |
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
protected void |
serviceStart()
Actions called during the INITED to STARTED transition.
|
addIfService, addService, getServices, removeService, serviceStopclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic JobHistoryCopyService(ApplicationAttemptId applicationAttemptId, EventHandler handler)
protected void serviceInit(Configuration conf) throws Exception
AbstractServiceAbstractService.init(Configuration) prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit in class CompositeServiceconf - configurationException - on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stoppublic void handleEvent(HistoryEvent event) throws IOException
handleEvent in interface HistoryEventHandlerIOExceptionprotected void serviceStart()
throws Exception
AbstractServiceAbstractService.start() prevents re-entrancy.serviceStart in class CompositeServiceException - if needed -these will be caught,
wrapped, and trigger a service stoppublic static FSDataInputStream getPreviousJobHistoryFileStream(Configuration conf, ApplicationAttemptId applicationAttemptId) throws IOException
IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.