Class ConfiguredRMFailoverProxyProvider<T>

java.lang.Object
org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider<T>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.io.retry.FailoverProxyProvider<T>, RMFailoverProxyProvider<T>
Direct Known Subclasses:
AutoRefreshRMFailoverProxyProvider, RequestHedgingRMFailoverProxyProvider

@Private @Unstable public class ConfiguredRMFailoverProxyProvider<T> extends Object implements RMFailoverProxyProvider<T>
  • Field Details

    • rmProxy

      protected RMProxy<T> rmProxy
    • protocol

      protected Class<T> protocol
    • conf

      protected org.apache.hadoop.yarn.conf.YarnConfiguration conf
    • rmServiceIds

      protected String[] rmServiceIds
  • Constructor Details

    • ConfiguredRMFailoverProxyProvider

      public ConfiguredRMFailoverProxyProvider()
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration configuration, RMProxy<T> rmProxy, Class<T> protocol)
      Description copied from interface: RMFailoverProxyProvider
      Initialize internal data structures, invoked right after instantiation.
      Specified by:
      init in interface RMFailoverProxyProvider<T>
      Parameters:
      configuration - Configuration to use
      rmProxy - The RMProxy instance to use
      protocol - The communication protocol to use
    • getProxyInternal

      protected T getProxyInternal()
    • getProxy

      public org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T> getProxy()
      Specified by:
      getProxy in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
    • performFailover

      public void performFailover(T currentProxy)
      Specified by:
      performFailover in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
    • getInterface

      public Class<T> getInterface()
      Specified by:
      getInterface in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
    • close

      public void close() throws IOException
      Close all the proxy objects which have been opened over the lifetime of this proxy provider.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException