Class TimelineV2ClientImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
-
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
ConstructorsConstructorDescriptionTimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.ApplicationIdvoidputEntities(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.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.protected voidputObjects(String path, javax.ws.rs.core.MultivaluedMap<String, String> params, Object obj) protected voidputObjects(URI base, String path, javax.ws.rs.core.MultivaluedMap<String, String> params, Object obj) 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.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.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidsetTimelineCollectorInfo(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.yarn.client.api.TimelineV2Client
createTimelineClientMethods 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
-
TimelineV2ClientImpl
public TimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId)
-
-
Method Details
-
getContextAppId
public org.apache.hadoop.yarn.api.records.ApplicationId getContextAppId() -
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
putEntities
public void putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Description copied from class:TimelineV2ClientSend 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.
- Specified by:
putEntitiesin classTimelineV2Client- 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 void putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Description copied from class:TimelineV2ClientSend 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.
- Specified by:
putEntitiesAsyncin classTimelineV2Client- Parameters:
entities- the collection ofTimelineEntity- Throws:
IOException- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException- if entities are incomplete/invalid
-
putSubAppEntities
public void putSubAppEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Description copied from class:TimelineV2ClientSend 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.
- Specified by:
putSubAppEntitiesin classTimelineV2Client- 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 void putSubAppEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException Description copied from class:TimelineV2ClientSend 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 .
- Specified by:
putSubAppEntitiesAsyncin classTimelineV2Client- 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 void setTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo) Description copied from class:TimelineV2ClientUpdate 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.
- Specified by:
setTimelineCollectorInfoin classTimelineV2Client- Parameters:
collectorInfo- Collector info which contains the timeline service address and timeline delegation token.
-
putObjects
@Private protected void putObjects(String path, javax.ws.rs.core.MultivaluedMap<String, String> params, Object obj) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException- Throws:
IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
-
putObjects
protected void putObjects(URI base, String path, javax.ws.rs.core.MultivaluedMap<String, String> params, Object obj) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException- Throws:
IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
-