org.apache.hadoop.yarn.client
Class RMProxy<T>

java.lang.Object
  extended by org.apache.hadoop.yarn.client.RMProxy<T>
Direct Known Subclasses:
ClientRMProxy

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class RMProxy<T>
extends Object


Constructor Summary
protected RMProxy()
           
 
Method Summary
protected  void checkAllowedProtocols(Class<?> protocol)
          Verify the passed protocol is supported.
static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf)
          Fetch retry policy from Configuration
static
<T> T
createRMProxy(org.apache.hadoop.conf.Configuration conf, Class<T> protocol, InetSocketAddress rmAddress)
          Deprecated. This method is deprecated and is not used by YARN internally any more. To create a proxy to the RM, use ClientRMProxy#createRMProxy or ServerRMProxy#createRMProxy. Create a proxy to the ResourceManager at the specified address.
protected static
<T> T
createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, RMProxy instance)
          Create a proxy for the specified protocol.
protected  InetSocketAddress getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<?> protocol)
          Get the ResourceManager address from the provided Configuration for the given protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMProxy

protected RMProxy()
Method Detail

checkAllowedProtocols

@InterfaceAudience.Private
protected void checkAllowedProtocols(Class<?> protocol)
Verify the passed protocol is supported.


getRMAddress

@InterfaceAudience.Private
protected InetSocketAddress getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf,
                                                                   Class<?> protocol)
                                  throws IOException
Get the ResourceManager address from the provided Configuration for the given protocol.

Throws:
IOException

createRMProxy

@InterfaceAudience.Private
protected static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration,
                                                               Class<T> protocol,
                                                               RMProxy instance)
                          throws IOException
Create a proxy for the specified protocol. For non-HA, this is a direct connection to the ResourceManager address. When HA is enabled, the proxy handles the failover between the ResourceManagers as well.

Throws:
IOException

createRMProxy

@Deprecated
public static <T> T createRMProxy(org.apache.hadoop.conf.Configuration conf,
                                             Class<T> protocol,
                                             InetSocketAddress rmAddress)
                       throws IOException
Deprecated. This method is deprecated and is not used by YARN internally any more. To create a proxy to the RM, use ClientRMProxy#createRMProxy or ServerRMProxy#createRMProxy. Create a proxy to the ResourceManager at the specified address.

Type Parameters:
T - Type information of the proxy
Parameters:
conf - Configuration to generate retry policy
protocol - Protocol for the proxy
rmAddress - Address of the ResourceManager
Returns:
Proxy to the RM
Throws:
IOException

createRetryPolicy

@InterfaceAudience.Private
public static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf)
Fetch retry policy from Configuration



Copyright © 2014 Apache Software Foundation. All Rights Reserved.