@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class AuxiliaryService
extends org.apache.hadoop.service.AbstractService
YarnConfiguration.NM_AUX_SERVICES
.Modifier | Constructor and Description |
---|---|
protected |
AuxiliaryService(String name) |
Modifier and Type | Method and Description |
---|---|
AuxiliaryLocalPathHandler |
getAuxiliaryLocalPathHandler()
Method that gets the local dirs path handler for this Auxiliary Service.
|
abstract ByteBuffer |
getMetaData()
Retrieve meta-data for this
AuxiliaryService . |
protected org.apache.hadoop.fs.Path |
getRecoveryPath()
Get the path specific to this auxiliary service to use for recovery.
|
abstract void |
initializeApplication(ApplicationInitializationContext initAppContext)
A new application is started on this NodeManager.
|
void |
initializeContainer(ContainerInitializationContext initContainerContext)
A new container is started on this NodeManager.
|
void |
setAuxiliaryLocalPathHandler(AuxiliaryLocalPathHandler auxiliaryLocalPathHandler)
Method that sets the local dirs path handler for this Auxiliary Service.
|
void |
setRecoveryPath(org.apache.hadoop.fs.Path recoveryPath)
Set the path for this auxiliary service to use for storing state
that will be used during recovery.
|
abstract void |
stopApplication(ApplicationTerminationContext stopAppContext)
An application is finishing on this NodeManager.
|
void |
stopContainer(ContainerTerminationContext stopContainerContext)
A container is finishing on this NodeManager.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected AuxiliaryService(String name)
protected org.apache.hadoop.fs.Path getRecoveryPath()
public abstract void initializeApplication(ApplicationInitializationContext initAppContext)
AuxiliaryService
about the application initialization.initAppContext
- context for the application's initializationpublic abstract void stopApplication(ApplicationTerminationContext stopAppContext)
AuxiliaryService
about the same.stopAppContext
- context for the application terminationpublic abstract ByteBuffer getMetaData()
AuxiliaryService
. Applications using
this AuxiliaryService
SHOULD know the format of the meta-data -
ideally each service should provide a method to parse out the information
to the applications. One example of meta-data is contact information so
that applications can access the service remotely. This will only be called
after the service's AbstractService.start()
method has finished. the result may be
cached.
The information is passed along to applications via
StartContainersResponse.getAllServicesMetaData()
that is returned by
ContainerManagementProtocol.startContainers(StartContainersRequest)
public void initializeContainer(ContainerInitializationContext initContainerContext)
AuxiliaryService
about the container initialization.
This method is called when the NodeManager receives the container launch
command from the ApplicationMaster and before the container process is
launched.initContainerContext
- context for the container's initializationpublic void stopContainer(ContainerTerminationContext stopContainerContext)
AuxiliaryService
about the same.stopContainerContext
- context for the container terminationpublic void setRecoveryPath(org.apache.hadoop.fs.Path recoveryPath)
recoveryPath
- where recoverable state should be storedpublic AuxiliaryLocalPathHandler getAuxiliaryLocalPathHandler()
public void setAuxiliaryLocalPathHandler(AuxiliaryLocalPathHandler auxiliaryLocalPathHandler)
auxiliaryLocalPathHandler
- the pathHandler for this auxiliary serviceCopyright © 2008–2021 Apache Software Foundation. All rights reserved.