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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Abstract class for an operation that should be retried by timeline client.
    static class 
     

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Constructor Summary

    Constructors
    Constructor
    Description
    TimelineConnector(boolean requireConnectionRetry, org.apache.hadoop.security.UserGroupInformation authUgi, String doAsUser, org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.Token token)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static URI
    constructResURI(org.apache.hadoop.conf.Configuration conf, String address, String uri)
     
    javax.ws.rs.client.Client
     
    protected org.apache.hadoop.security.ssl.SSLFactory
    getSSLFactory(org.apache.hadoop.conf.Configuration conf)
     
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    void
    setSocketTimeOut(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.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:
      GeneralSecurityException
      IOException
    • constructResURI

      public static URI constructResURI(org.apache.hadoop.conf.Configuration conf, String address, String uri)
    • serviceStop

      protected void serviceStop()
      Overrides:
      serviceStop in class org.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:
      IOException
      org.apache.hadoop.yarn.exceptions.YarnException
    • setSocketTimeOut

      @VisibleForTesting public void setSocketTimeOut(int socketTimeOut)