Class FederationRMFailoverProxyProvider<T>

java.lang.Object
org.apache.hadoop.yarn.server.federation.failover.FederationRMFailoverProxyProvider<T>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.io.retry.FailoverProxyProvider<T>, org.apache.hadoop.yarn.client.RMFailoverProxyProvider<T>

@Private @Unstable public class FederationRMFailoverProxyProvider<T> extends Object implements org.apache.hadoop.yarn.client.RMFailoverProxyProvider<T>
A FailoverProxyProvider implementation that uses the FederationStateStore to determine the ResourceManager to connect to. This supports both HA and regular mode which is controlled by configuration.
  • Constructor Details

    • FederationRMFailoverProxyProvider

      public FederationRMFailoverProxyProvider()
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.yarn.client.RMProxy<T> proxy, Class<T> proto)
      Specified by:
      init in interface org.apache.hadoop.yarn.client.RMFailoverProxyProvider<T>
    • createRMProxy

      @VisibleForTesting protected T createRMProxy(InetSocketAddress rmAddress) throws IOException
      Throws:
      IOException
    • 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