Class FederationProxyProviderUtil
java.lang.Object
org.apache.hadoop.yarn.server.federation.failover.FederationProxyProviderUtil
Utility class that creates proxy for specified protocols when federation is
enabled. The class creates a federation aware failover provider, i.e. the
failover provider uses the
FederationStateStore to determine the
current active ResourceManager-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcreateRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, SubClusterId subClusterId, org.apache.hadoop.security.UserGroupInformation user) Create a proxy for the specified protocol in the context of Federation.static <T> TcreateRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, SubClusterId subClusterId, org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token) Create a proxy for the specified protocol in the context of Federation.static voidupdateConfForFederation(org.apache.hadoop.conf.Configuration conf, String subClusterId) Updating the conf with Federation as long as certain subclusterId.
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Method Details
-
createRMProxy
@Public @Unstable public static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, SubClusterId subClusterId, org.apache.hadoop.security.UserGroupInformation user) throws IOException Create a proxy for the specified protocol in the context of Federation. 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.- Type Parameters:
T- Type information of the proxy- Parameters:
configuration- Configuration to generateClientRMProxyprotocol- Protocol for the proxysubClusterId- the unique identifier or the sub-clusteruser- the user on whose behalf the proxy is being created- Returns:
- Proxy to the RM
- Throws:
IOException- on failure
-
createRMProxy
@Public @Unstable public static <T> T createRMProxy(org.apache.hadoop.conf.Configuration configuration, Class<T> protocol, SubClusterId subClusterId, org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token) throws IOException Create a proxy for the specified protocol in the context of Federation. 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.- Type Parameters:
T- Type information of the proxy- Parameters:
configuration- Configuration to generateClientRMProxyprotocol- Protocol for the proxysubClusterId- the unique identifier or the sub-clusteruser- the user on whose behalf the proxy is being createdtoken- the auth token to use for connection- Returns:
- Proxy to the RM
- Throws:
IOException- on failure
-
updateConfForFederation
public static void updateConfForFederation(org.apache.hadoop.conf.Configuration conf, String subClusterId) Updating the conf with Federation as long as certain subclusterId.- Parameters:
conf- configurationsubClusterId- subclusterId for the conf
-