Class TimelineV2Client
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
- Direct Known Subclasses:
TimelineV2ClientImpl
TimelineClient for ATS V1 interface.-
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 TypeMethodDescriptionstatic TimelineV2ClientcreateTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) Creates an instance of the timeline v.2 client.abstract voidputEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector.abstract voidputEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector.abstract voidputSubAppEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector.abstract voidputSubAppEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector.abstract voidsetTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo) Update collector info received in AllocateResponse which contains the timeline service address where the request will be sent to and the timeline delegation token which will be used to send the request.Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceInit, serviceStart, serviceStopMethods 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
-
TimelineV2Client
-
-
Method Details
-
createTimelineClient
@Public public static TimelineV2Client createTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId) Creates an instance of the timeline v.2 client.- Parameters:
appId- the application id with which the timeline client is associated- Returns:
- the created timeline client instance
-
putEntities
@Public public abstract void putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector. It is a blocking API. The method will not return until all the put entities have been persisted.
- Parameters:
entities- the collection ofTimelineEntity- Throws:
IOException- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException- if entities are incomplete/invalid
-
putEntitiesAsync
@Public public abstract void putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector. It is an asynchronous API. The method will return once all the entities are received.
- Parameters:
entities- the collection ofTimelineEntity- Throws:
IOException- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException- if entities are incomplete/invalid
-
setTimelineCollectorInfo
public abstract void setTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo) Update collector info received in AllocateResponse which contains the timeline service address where the request will be sent to and the timeline delegation token which will be used to send the request.
- Parameters:
collectorInfo- Collector info which contains the timeline service address and timeline delegation token.
-
putSubAppEntities
@Public public abstract void putSubAppEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector. It is a blocking API. The method will not return until all the put entities have been persisted.
- Parameters:
entities- the collection ofTimelineEntity- Throws:
IOException- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException- if entities are incomplete/invalid
-
putSubAppEntitiesAsync
@Public public abstract void putSubAppEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector. It is an asynchronous API. The method will return once all the entities are received .
- Parameters:
entities- the collection ofTimelineEntity- Throws:
IOException- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException- if entities are incomplete/invalid
-