@InterfaceAudience.Private @InterfaceStability.Evolving public class TimelineClientImpl extends TimelineClient
Modifier and Type | Class and Description |
---|---|
static class |
TimelineClientImpl.TimelineClientRetryOp |
class |
TimelineClientImpl.TimelineClientRetryOpForOperateDelegationToken |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SOCKET_TIMEOUT |
Constructor and Description |
---|
TimelineClientImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cancelDelegationToken(org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> timelineDT)
Cancel a timeline delegation token.
|
TimelineClientImpl.TimelineClientRetryOp |
createTimelineClientRetryOpForOperateDelegationToken(PrivilegedExceptionAction<?> action) |
protected TimelineWriter |
createTimelineWriter(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.security.UserGroupInformation ugi,
com.sun.jersey.api.client.Client webClient,
URI uri) |
void |
flush() |
org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> |
getDelegationToken(String renewer)
Get a delegation token so as to be able to talk to the timeline server in a
secure way.
|
org.apache.hadoop.security.UserGroupInformation |
getUgi() |
static void |
main(String[] argv) |
void |
putDomain(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain)
Send the information of a domain to the timeline server.
|
void |
putDomain(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain)
Send the information of a domain to the timeline server.
|
org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse |
putEntities(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
org.apache.hadoop.yarn.api.records.timeline.TimelineEntityGroupId groupId,
org.apache.hadoop.yarn.api.records.timeline.TimelineEntity... entities)
Send the information of a number of conceptual entities to the timeline
server.
|
org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse |
putEntities(org.apache.hadoop.yarn.api.records.timeline.TimelineEntity... entities)
Send the information of a number of conceptual entities to the timeline
server.
|
long |
renewDelegationToken(org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> timelineDT)
Renew a timeline delegation token.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setTimelineWriter(TimelineWriter writer) |
String |
toString() |
createTimelineClient
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public static final int DEFAULT_SOCKET_TIMEOUT
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected TimelineWriter createTimelineWriter(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation ugi, com.sun.jersey.api.client.Client webClient, URI uri) throws IOException
IOException
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public void flush() throws IOException
IOException
public org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse putEntities(org.apache.hadoop.yarn.api.records.timeline.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Send the information of a number of conceptual entities to the timeline server. It is a blocking API. The method will not return until it gets the response from the timeline server.
putEntities
in class TimelineClient
entities
- the collection of TimelineEntity
IOException
org.apache.hadoop.yarn.exceptions.YarnException
public void putDomain(org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Send the information of a domain to the timeline server. It is a blocking API. The method will not return until it gets the response from the timeline server.
putDomain
in class TimelineClient
domain
- an TimelineDomain
objectIOException
org.apache.hadoop.yarn.exceptions.YarnException
public org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> getDelegationToken(String renewer) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Get a delegation token so as to be able to talk to the timeline server in a secure way.
getDelegationToken
in class TimelineClient
renewer
- Address of the renewer who can renew these tokens when needed by
securely talking to the timeline serverToken
) that can be used to talk to the
timeline serverIOException
org.apache.hadoop.yarn.exceptions.YarnException
public long renewDelegationToken(org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> timelineDT) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Renew a timeline delegation token.
renewDelegationToken
in class TimelineClient
timelineDT
- the delegation token to renewIOException
org.apache.hadoop.yarn.exceptions.YarnException
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<TimelineDelegationTokenIdentifier> timelineDT) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Cancel a timeline delegation token.
cancelDelegationToken
in class TimelineClient
timelineDT
- the delegation token to cancelIOException
org.apache.hadoop.yarn.exceptions.YarnException
public String toString()
toString
in class org.apache.hadoop.service.AbstractService
@InterfaceAudience.Private public org.apache.hadoop.security.UserGroupInformation getUgi()
public org.apache.hadoop.yarn.api.records.timeline.TimelinePutResponse putEntities(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, org.apache.hadoop.yarn.api.records.timeline.TimelineEntityGroupId groupId, org.apache.hadoop.yarn.api.records.timeline.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Send the information of a number of conceptual entities to the timeline server. It is a blocking API. The method will not return until it gets the response from the timeline server. This API is only for timeline service v1.5
putEntities
in class TimelineClient
appAttemptId
- ApplicationAttemptId
groupId
- TimelineEntityGroupId
entities
- the collection of TimelineEntity
IOException
org.apache.hadoop.yarn.exceptions.YarnException
public void putDomain(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, org.apache.hadoop.yarn.api.records.timeline.TimelineDomain domain) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
TimelineClient
Send the information of a domain to the timeline server. It is a blocking API. The method will not return until it gets the response from the timeline server. This API is only for timeline service v1.5
putDomain
in class TimelineClient
appAttemptId
- ApplicationAttemptId
domain
- an TimelineDomain
objectIOException
org.apache.hadoop.yarn.exceptions.YarnException
@InterfaceAudience.Private public void setTimelineWriter(TimelineWriter writer)
@InterfaceAudience.Private public TimelineClientImpl.TimelineClientRetryOp createTimelineClientRetryOpForOperateDelegationToken(PrivilegedExceptionAction<?> action) throws IOException
IOException
Copyright © 2018 Apache Software Foundation. All Rights Reserved.