Class PerNodeTimelineCollectorsAuxService
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.api.AuxiliaryService
org.apache.hadoop.yarn.server.timelineservice.collector.PerNodeTimelineCollectorsAuxService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
@Private
@Unstable
public class PerNodeTimelineCollectorsAuxService
extends org.apache.hadoop.yarn.server.api.AuxiliaryService
The top-level server for the per-node timeline collector manager. Currently
it is defined as an auxiliary service to accommodate running within another
daemon (e.g. node manager).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddApplicationIfAbsent(org.apache.hadoop.yarn.api.records.ApplicationId appId, String user) Creates and adds an app level collector for the specified application id.voidinitializeApplication(org.apache.hadoop.yarn.server.api.ApplicationInitializationContext context) voidinitializeContainer(org.apache.hadoop.yarn.server.api.ContainerInitializationContext context) Creates and adds an app level collector for the specified application id.launchServer(String[] args, NodeTimelineCollectorManager collectorManager, org.apache.hadoop.conf.Configuration conf) static voidbooleanremoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) Removes the app level collector for the specified application id.protected FutureremoveApplicationCollector(org.apache.hadoop.yarn.api.records.ContainerId containerId) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidstopApplication(org.apache.hadoop.yarn.server.api.ApplicationTerminationContext context) voidstopContainer(org.apache.hadoop.yarn.server.api.ContainerTerminationContext context) Removes the app level collector for the specified application id.Methods inherited from class org.apache.hadoop.yarn.server.api.AuxiliaryService
getAuxiliaryLocalPathHandler, getRecoveryPath, setAuxiliaryLocalPathHandler, setRecoveryPathMethods 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
-
PerNodeTimelineCollectorsAuxService
public PerNodeTimelineCollectorsAuxService()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
addApplicationIfAbsent
public boolean addApplicationIfAbsent(org.apache.hadoop.yarn.api.records.ApplicationId appId, String user) Creates and adds an app level collector for the specified application id. The collector is also initialized and started. If the service already exists, no new service is created.- Parameters:
appId- Application Id to be added.user- Application Master container user.- Returns:
- whether it was added successfully
-
removeApplication
public boolean removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) Removes the app level collector for the specified application id. The collector is also stopped as a result. If the collector does not exist, no change is made.- Parameters:
appId- Application Id to be removed.- Returns:
- whether it was removed successfully
-
initializeContainer
public void initializeContainer(org.apache.hadoop.yarn.server.api.ContainerInitializationContext context) Creates and adds an app level collector for the specified application id. The collector is also initialized and started. If the collector already exists, no new collector is created.- Overrides:
initializeContainerin classorg.apache.hadoop.yarn.server.api.AuxiliaryService
-
stopContainer
public void stopContainer(org.apache.hadoop.yarn.server.api.ContainerTerminationContext context) Removes the app level collector for the specified application id. The collector is also stopped as a result. If the collector does not exist, no change is made.- Overrides:
stopContainerin classorg.apache.hadoop.yarn.server.api.AuxiliaryService
-
removeApplicationCollector
@VisibleForTesting protected Future removeApplicationCollector(org.apache.hadoop.yarn.api.records.ContainerId containerId) -
initializeApplication
public void initializeApplication(org.apache.hadoop.yarn.server.api.ApplicationInitializationContext context) - Specified by:
initializeApplicationin classorg.apache.hadoop.yarn.server.api.AuxiliaryService
-
stopApplication
public void stopApplication(org.apache.hadoop.yarn.server.api.ApplicationTerminationContext context) - Specified by:
stopApplicationin classorg.apache.hadoop.yarn.server.api.AuxiliaryService
-
getMetaData
- Specified by:
getMetaDatain classorg.apache.hadoop.yarn.server.api.AuxiliaryService
-
launchServer
@VisibleForTesting public static PerNodeTimelineCollectorsAuxService launchServer(String[] args, NodeTimelineCollectorManager collectorManager, org.apache.hadoop.conf.Configuration conf) -
main
-