Class DefaultNoHARMFailoverProxyProvider<T>

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

@Private @Unstable public class DefaultNoHARMFailoverProxyProvider<T> extends Object implements RMFailoverProxyProvider<T>
An implementation of RMFailoverProxyProvider which does nothing in the event of failover, and always returns the same proxy object. This is the default non-HA RM Failover proxy provider. It is used to replace DefaultFailoverProxyProvider which was used as Yarn default non-HA.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.io.retry.FailoverProxyProvider

    org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Class<T>
     
    protected T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the current proxy.
     
    org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T>
     
    void
    init(org.apache.hadoop.conf.Configuration conf, RMProxy<T> proxy, Class<T> protocol)
    Initialize internal data structures, invoked right after instantiation.
    void
    performFailover(T currentProxy)
    PerformFailover does nothing in this class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • proxy

      protected T proxy
    • protocol

      protected Class<T> protocol
  • Constructor Details

    • DefaultNoHARMFailoverProxyProvider

      public DefaultNoHARMFailoverProxyProvider()
  • Method Details

    • init

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

      public Class<T> getInterface()
      Specified by:
      getInterface in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
    • 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)
      PerformFailover does nothing in this class.
      Specified by:
      performFailover in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
      Parameters:
      currentProxy - currentProxy.
    • close

      public void close() throws IOException
      Close the current proxy.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - io error occur.