Class TimelineConnector
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.client.api.impl.TimelineConnector
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
public class TimelineConnector
extends org.apache.hadoop.service.AbstractService
Utility Connector class which is used by timeline clients to securely get
connected to the timeline server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstract class for an operation that should be retried by timeline client.static classNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Constructor Summary
ConstructorsConstructorDescriptionTimelineConnector(boolean requireConnectionRetry, org.apache.hadoop.security.UserGroupInformation authUgi, String doAsUser, org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.Token token) -
Method Summary
Modifier and TypeMethodDescriptionstatic URIconstructResURI(org.apache.hadoop.conf.Configuration conf, String address, String uri) javax.ws.rs.client.Clientprotected org.apache.hadoop.security.ssl.SSLFactorygetSSLFactory(org.apache.hadoop.conf.Configuration conf) operateDelegationToken(PrivilegedExceptionAction<?> action) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidvoidsetSocketTimeOut(int socketTimeOut) Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
TimelineConnector
public TimelineConnector(boolean requireConnectionRetry, org.apache.hadoop.security.UserGroupInformation authUgi, String doAsUser, org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.Token token)
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
getSSLFactory
protected org.apache.hadoop.security.ssl.SSLFactory getSSLFactory(org.apache.hadoop.conf.Configuration conf) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-
constructResURI
-
serviceStop
protected void serviceStop()- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService
-
getClient
public javax.ws.rs.client.Client getClient() -
operateDelegationToken
public Object operateDelegationToken(PrivilegedExceptionAction<?> action) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException - Throws:
IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
-
setSocketTimeOut
@VisibleForTesting public void setSocketTimeOut(int socketTimeOut)
-