ClientRMProxy (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.client, class: ClientRMProxy

Package org.apache.hadoop.yarn.client

# Class ClientRMProxy<T>

java.lang.Object
org.apache.hadoop.yarn.client.RMProxy<T>
org.apache.hadoop.yarn.client.ClientRMProxy<T>

@Public @Stable public class ClientRMProxy<T> extends RMProxy<T>

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkAllowedProtocols(Class<?> protocol)`
  Verify the passed protocol is supported.
  `static <T> T`
  `createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol)`
  Create a proxy to the ResourceManager for the specified protocol.
  `static <T> T`
  `createRMProxyFederation(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol)`
  Create a proxy to the ResourceManager for the specified protocol.
  `static org.apache.hadoop.io.Text`
  `getAMRMTokenService(org.apache.hadoop.conf.Configuration conf)`
  `static <T> RMFailoverProxyProvider<T>`
  `getClientRMFailoverProxyProvider(org.apache.hadoop.yarn.conf.YarnConfiguration configuration, Class<T> protocol)`
  `InetSocketAddress`
  `getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<?> protocol)`
  Get the ResourceManager address from the provided Configuration for the given protocol.
  `static org.apache.hadoop.io.Text`
  `getRMDelegationTokenService(org.apache.hadoop.conf.Configuration conf)`
  Get the token service name to be used for RMDelegationToken.
  `static org.apache.hadoop.io.Text`
  `getTokenService(org.apache.hadoop.conf.Configuration conf, String address, String defaultAddr, int defaultPort)`

  ### Methods inherited from class org.apache.hadoop.yarn.client.RMProxy

  `createRetryPolicy, createRetryPolicy, createRMProxy, createRMProxy, createRMProxyFederation, getProxy, getRMFailoverProxyProvider, newProxyInstanceFederation`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### createRMProxy

    public static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol) throws IOException
    Create a proxy to the ResourceManager for the specified protocol.
    Type Parameters:
      `T` - Type of proxy.
    Parameters:
      `configuration` - Configuration with all the required information.
      `protocol` - Client protocol for which proxy is being requested.
    Returns:
      Proxy to the ResourceManager for the specified client protocol.
    Throws:
      `IOException` - io error occur.

  - ### createRMProxyFederation

    public static <T> T createRMProxyFederation(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol) throws IOException
    Create a proxy to the ResourceManager for the specified protocol. This method is only used for NodeManager#AMRMClientUtils.
    Type Parameters:
      `T` - Type of proxy.
    Parameters:
      `configuration` - Configuration with all the required information.
      `protocol` - Client protocol for which proxy is being requested.
    Returns:
      Proxy to the ResourceManager for the specified client protocol.
    Throws:
      `IOException` - io error occur.

  - ### getClientRMFailoverProxyProvider

    @VisibleForTesting public static <T> RMFailoverProxyProvider<T> getClientRMFailoverProxyProvider(org.apache.hadoop.yarn.conf.YarnConfiguration configuration, Class<T> protocol)

  - ### getRMAddress

    @Private public InetSocketAddress getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<?> protocol) throws IOException
    Description copied from class: `RMProxy`
    Get the ResourceManager address from the provided Configuration for the given protocol.
    Overrides:
      `getRMAddress` in class `RMProxy<T>`
    Parameters:
      `conf` - configuration.
      `protocol` - protocol.
    Returns:
      inet socket address.
    Throws:
      `IOException` - io error occur.

  - ### checkAllowedProtocols

    @Private public void checkAllowedProtocols(Class<?> protocol)
    Description copied from class: `RMProxy`
    Verify the passed protocol is supported.
    Overrides:
      `checkAllowedProtocols` in class `RMProxy<T>`
    Parameters:
      `protocol` - protocol.

  - ### getRMDelegationTokenService

    @Unstable public static org.apache.hadoop.io.Text getRMDelegationTokenService(org.apache.hadoop.conf.Configuration conf)
    Get the token service name to be used for RMDelegationToken. Depending on whether HA is enabled or not, this method generates the appropriate service name as a comma-separated list of service addresses.
    Parameters:
      `conf` - Configuration corresponding to the cluster we need the RMDelegationToken for
    Returns:
      - Service name for RMDelegationToken

  - ### getAMRMTokenService

    @Unstable public static org.apache.hadoop.io.Text getAMRMTokenService(org.apache.hadoop.conf.Configuration conf)

  - ### getTokenService

    @Unstable public static org.apache.hadoop.io.Text getTokenService(org.apache.hadoop.conf.Configuration conf, String address, String defaultAddr, int defaultPort)