@InterfaceAudience.Public @InterfaceStability.Evolving public class RMProxy<T> extends Object
Modifier | Constructor and Description |
---|---|
protected |
RMProxy() |
Modifier and Type | Method and Description |
---|---|
void |
checkAllowedProtocols(Class<?> protocol)
Verify the passed protocol is supported.
|
static org.apache.hadoop.io.retry.RetryPolicy |
createRetryPolicy(org.apache.hadoop.conf.Configuration conf,
boolean isHAEnabled)
Fetch retry policy from Configuration.
|
protected static org.apache.hadoop.io.retry.RetryPolicy |
createRetryPolicy(org.apache.hadoop.conf.Configuration conf,
long retryTime,
long retryInterval,
boolean isHAEnabled)
Fetch retry policy from Configuration and create the
retry policy with specified retryTime and retry interval.
|
protected static <T> T |
createRMProxy(org.apache.hadoop.conf.Configuration configuration,
Class<T> protocol,
RMProxy<T> instance)
Currently, used by Client and AM only
Create a proxy for the specified protocol.
|
protected static <T> T |
createRMProxy(org.apache.hadoop.conf.Configuration configuration,
Class<T> protocol,
RMProxy<T> instance,
long retryTime,
long retryInterval)
Currently, used by NodeManagers only.
|
protected static <T> T |
createRMProxyFederation(org.apache.hadoop.conf.Configuration configuration,
Class<T> protocol,
RMProxy<T> instance)
This functionality is only used for NodeManager and only in non-HA mode.
|
<T> T |
getProxy(org.apache.hadoop.conf.Configuration conf,
Class<T> protocol,
InetSocketAddress rmAddress)
Get a proxy to the RM at the specified address.
|
InetSocketAddress |
getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf,
Class<?> protocol)
Get the ResourceManager address from the provided Configuration for the
given protocol.
|
protected static <T> RMFailoverProxyProvider<T> |
getRMFailoverProxyProvider(org.apache.hadoop.yarn.conf.YarnConfiguration conf,
Class<T> protocol,
RMProxy<T> instance) |
protected static <T> T |
newProxyInstanceFederation(org.apache.hadoop.yarn.conf.YarnConfiguration conf,
Class<T> protocol,
RMProxy<T> instance,
org.apache.hadoop.io.retry.RetryPolicy retryPolicy) |
@InterfaceAudience.Private public void checkAllowedProtocols(Class<?> protocol)
protocol
- protocol.@InterfaceAudience.Private public InetSocketAddress getRMAddress(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<?> protocol) throws IOException
conf
- configuration.protocol
- protocol.IOException
- io error occur.@InterfaceAudience.Private protected static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, RMProxy<T> instance) throws IOException
T
- Generic T.configuration
- configuration.protocol
- protocol.instance
- RMProxy instance.IOException
- io error occur.protected static <T> T createRMProxyFederation(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, RMProxy<T> instance) throws IOException
T
- Generic T.configuration
- configuration.protocol
- protocol.instance
- RMProxy instance.IOException
- io error occur.protected static <T> T newProxyInstanceFederation(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<T> protocol, RMProxy<T> instance, org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
protected static <T> RMFailoverProxyProvider<T> getRMFailoverProxyProvider(org.apache.hadoop.yarn.conf.YarnConfiguration conf, Class<T> protocol, RMProxy<T> instance)
@InterfaceAudience.Private protected static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, RMProxy<T> instance, long retryTime, long retryInterval) throws IOException
T
- Generic T.configuration
- configuration.protocol
- protocol.instance
- RMProxy instance.retryTime
- retry Time.retryInterval
- retry Interval.IOException
- io error occur.@InterfaceAudience.Private public <T> T getProxy(org.apache.hadoop.conf.Configuration conf, Class<T> protocol, InetSocketAddress rmAddress) throws IOException
T
- Generic T.conf
- configuration.protocol
- protocol.rmAddress
- rmAddress.IOException
- io error occur.@InterfaceAudience.Private @VisibleForTesting public static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf, boolean isHAEnabled)
conf
- configuration.isHAEnabled
- is HA enabled.protected static org.apache.hadoop.io.retry.RetryPolicy createRetryPolicy(org.apache.hadoop.conf.Configuration conf, long retryTime, long retryInterval, boolean isHAEnabled)
conf
- configuration.retryTime
- retry time.retryInterval
- retry interval.isHAEnabled
- is HA enabled.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.