Class ServiceTimelinePublisher
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.service.timelineservice.ServiceTimelinePublisher
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
public class ServiceTimelinePublisher
extends org.apache.hadoop.service.CompositeService
A single service that publishes all the Timeline Entities.
-
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
FieldsFields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
ConstructorsConstructorDescriptionServiceTimelinePublisher(org.apache.hadoop.yarn.client.api.TimelineV2Client client) -
Method Summary
Modifier and TypeMethodDescriptionvoidcomponentFinished(Component comp, ComponentState state, long finishTime) voidcomponentInstanceBecomeReady(Container container) voidcomponentInstanceFinished(org.apache.hadoop.yarn.api.records.ContainerId containerId, int exitCode, ContainerState state, String diagnostics) voidcomponentInstanceIPHostUpdated(Container container) voidcomponentInstanceStarted(Container container, ComponentInstance instance) booleanvoidpublishMetrics(Iterable<org.apache.hadoop.metrics2.AbstractMetric> metrics, String entityId, String entityType, long timestamp) Called from ServiceMetricsSink at regular interval of time.voidserviceAttemptRegistered(Service service, org.apache.hadoop.conf.Configuration systemConf) voidserviceAttemptUnregistered(org.apache.hadoop.yarn.service.ServiceContext context, org.apache.hadoop.yarn.api.records.FinalApplicationStatus status, String diagnostics) voidserviceAttemptUpdated(Service service) protected voidserviceInit(org.apache.hadoop.conf.Configuration configuration) protected voidMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceStartMethods 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
-
Field Details
-
ATS_CONFIG_PUBLISH_SIZE_BYTES
public static final int ATS_CONFIG_PUBLISH_SIZE_BYTES- See Also:
-
-
Constructor Details
-
ServiceTimelinePublisher
public ServiceTimelinePublisher(org.apache.hadoop.yarn.client.api.TimelineV2Client client)
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
isStopped
public boolean isStopped() -
serviceAttemptRegistered
public void serviceAttemptRegistered(Service service, org.apache.hadoop.conf.Configuration systemConf) -
serviceAttemptUpdated
-
serviceAttemptUnregistered
public void serviceAttemptUnregistered(org.apache.hadoop.yarn.service.ServiceContext context, org.apache.hadoop.yarn.api.records.FinalApplicationStatus status, String diagnostics) -
componentInstanceStarted
-
componentInstanceFinished
public void componentInstanceFinished(org.apache.hadoop.yarn.api.records.ContainerId containerId, int exitCode, ContainerState state, String diagnostics) -
componentInstanceIPHostUpdated
-
componentInstanceBecomeReady
-
publishMetrics
public void publishMetrics(Iterable<org.apache.hadoop.metrics2.AbstractMetric> metrics, String entityId, String entityType, long timestamp) Called from ServiceMetricsSink at regular interval of time.- Parameters:
metrics- of service or componentsentityId- Id of entityentityType- Type of entitytimestamp-
-
componentFinished
-