public class TimelineV2ClientImpl extends TimelineV2Client
Constructor and Description |
---|
TimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
getContextAppId() |
void |
putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
Send the information of a number of conceptual entities to the timeline
service v.2 collector.
|
void |
putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
Send the information of a number of conceptual entities to the timeline
service v.2 collector.
|
protected void |
putObjects(String path,
javax.ws.rs.core.MultivaluedMap<String,String> params,
Object obj) |
protected void |
putObjects(URI base,
String path,
javax.ws.rs.core.MultivaluedMap<String,String> params,
Object obj) |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
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.
|
createTimelineClient
addIfService, addService, getServices, removeService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public TimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId)
public org.apache.hadoop.yarn.api.records.ApplicationId getContextAppId()
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.CompositeService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.CompositeService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.CompositeService
Exception
public void putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineV2Client
Send the information of a number of conceptual entities 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.
putEntities
in class TimelineV2Client
entities
- the collection of TimelineEntity
IOException
- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException
- if entities are incomplete/invalidpublic void putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineV2Client
Send the information of a number of conceptual entities to the timeline service v.2 collector. It is an asynchronous API. The method will return once all the entities are received.
putEntitiesAsync
in class TimelineV2Client
entities
- the collection of TimelineEntity
IOException
- if there are I/O errorsorg.apache.hadoop.yarn.exceptions.YarnException
- if entities are incomplete/invalidpublic void setTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo)
TimelineV2Client
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.
setTimelineCollectorInfo
in class TimelineV2Client
collectorInfo
- Collector info which contains the timeline service
address and timeline delegation token.@InterfaceAudience.Private protected void putObjects(String path, javax.ws.rs.core.MultivaluedMap<String,String> params, Object obj) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
IOException
org.apache.hadoop.yarn.exceptions.YarnException
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
IOException
org.apache.hadoop.yarn.exceptions.YarnException
Copyright © 2008–2018 Apache Software Foundation. All rights reserved.