Class NMTimelinePublisher
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.nodemanager.timelineservice.NMTimelinePublisher
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
public class NMTimelinePublisher
extends org.apache.hadoop.service.CompositeService
Metrics publisher service that publishes data to the timeline service v.2. It
is used only if the timeline service v.2 is enabled and the system publishing
of events and metrics is enabled.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.yarn.event.AsyncDispatchervoidcreateTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) protected voidvoidvoidvoidvoidreportContainerResourceUsage(Container container, Long pmemUsage, Float cpuUsagePercentPerCore) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidsetTimelineServiceAddress(org.apache.hadoop.yarn.api.records.ApplicationId appId, String collectorAddr) voidstopTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeServiceMethods 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
-
NMTimelinePublisher
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
createDispatcher
protected org.apache.hadoop.yarn.event.AsyncDispatcher createDispatcher() -
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
handleNMTimelineEvent
-
reportContainerResourceUsage
-
publishApplicationEvent
-
publishContainerEvent
-
publishLocalizationEvent
-
createTimelineClient
public void createTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) -
stopTimelineClient
public void stopTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) -
setTimelineServiceAddress
public void setTimelineServiceAddress(org.apache.hadoop.yarn.api.records.ApplicationId appId, String collectorAddr)
-