org.apache.hadoop.yarn.conf
Class HAUtil
java.lang.Object
org.apache.hadoop.yarn.conf.HAUtil
@InterfaceAudience.Private
public class HAUtil
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BAD_CONFIG_MESSAGE_PREFIX
public static final String BAD_CONFIG_MESSAGE_PREFIX
- See Also:
- Constant Field Values
isHAEnabled
public static boolean isHAEnabled(org.apache.hadoop.conf.Configuration conf)
- Returns true if Resource Manager HA is configured.
- Parameters:
conf - Configuration
- Returns:
- true if HA is configured in the configuration; else false.
isAutomaticFailoverEnabled
public static boolean isAutomaticFailoverEnabled(org.apache.hadoop.conf.Configuration conf)
isAutomaticFailoverEnabledAndEmbedded
public static boolean isAutomaticFailoverEnabledAndEmbedded(org.apache.hadoop.conf.Configuration conf)
isAutomaticFailoverEmbedded
public static boolean isAutomaticFailoverEmbedded(org.apache.hadoop.conf.Configuration conf)
verifyAndSetConfiguration
public static void verifyAndSetConfiguration(org.apache.hadoop.conf.Configuration conf)
throws YarnRuntimeException
- Verify configuration for Resource Manager HA.
- Parameters:
conf - Configuration
- Throws:
YarnRuntimeException
verifyAndSetAllServiceAddresses
public static void verifyAndSetAllServiceAddresses(org.apache.hadoop.conf.Configuration conf)
getRMHAIds
public static Collection<String> getRMHAIds(org.apache.hadoop.conf.Configuration conf)
- Parameters:
conf - Configuration. Please use getRMHAIds to check.
- Returns:
- RM Ids on success
getRMHAId
public static String getRMHAId(org.apache.hadoop.conf.Configuration conf)
- Parameters:
conf - Configuration. Please use verifyAndSetRMHAId to check.
- Returns:
- RM Id on success
getConfValueForRMInstance
public static String getConfValueForRMInstance(String prefix,
org.apache.hadoop.conf.Configuration conf)
getConfValueForRMInstance
public static String getConfValueForRMInstance(String prefix,
String defaultValue,
org.apache.hadoop.conf.Configuration conf)
addSuffix
public static String addSuffix(String key,
String suffix)
- Add non empty and non null suffix to a key
Copyright © 2014 Apache Software Foundation. All Rights Reserved.