@InterfaceAudience.Private public class HAUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BAD_CONFIG_MESSAGE_PREFIX |
Modifier and Type | Method and Description |
---|---|
static String |
addSuffix(String key,
String suffix)
Add non empty and non null suffix to a key.
|
static String |
getConfValueForRMInstance(String prefix,
org.apache.hadoop.conf.Configuration conf) |
static String |
getConfValueForRMInstance(String prefix,
String defaultValue,
org.apache.hadoop.conf.Configuration conf) |
static String |
getRMHAId(org.apache.hadoop.conf.Configuration conf) |
static Collection<String> |
getRMHAIds(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isAutomaticFailoverEmbedded(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isAutomaticFailoverEnabled(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isAutomaticFailoverEnabledAndEmbedded(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isFederationEnabled(org.apache.hadoop.conf.Configuration conf)
Returns true if Federation is configured.
|
static boolean |
isFederationFailoverEnabled(org.apache.hadoop.conf.Configuration conf)
Returns true if RM failover is enabled in a Federation setting.
|
static boolean |
isHAEnabled(org.apache.hadoop.conf.Configuration conf)
Returns true if Resource Manager HA is configured.
|
static void |
verifyAndSetAllServiceAddresses(org.apache.hadoop.conf.Configuration conf) |
static void |
verifyAndSetConfiguration(org.apache.hadoop.conf.Configuration conf)
Verify configuration for Resource Manager HA.
|
public static final String BAD_CONFIG_MESSAGE_PREFIX
public static boolean isFederationEnabled(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic static boolean isFederationFailoverEnabled(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic static boolean isHAEnabled(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic static boolean isAutomaticFailoverEnabled(org.apache.hadoop.conf.Configuration conf)
public static boolean isAutomaticFailoverEnabledAndEmbedded(org.apache.hadoop.conf.Configuration conf)
public static boolean isAutomaticFailoverEmbedded(org.apache.hadoop.conf.Configuration conf)
public static void verifyAndSetConfiguration(org.apache.hadoop.conf.Configuration conf) throws YarnRuntimeException
conf
- ConfigurationYarnRuntimeException
public static void verifyAndSetAllServiceAddresses(org.apache.hadoop.conf.Configuration conf)
public static Collection<String> getRMHAIds(org.apache.hadoop.conf.Configuration conf)
conf
- Configuration. Please use getRMHAIds to check.public static String getRMHAId(org.apache.hadoop.conf.Configuration conf)
conf
- Configuration. Please use verifyAndSetRMHAId to check.public static String getConfValueForRMInstance(String prefix, org.apache.hadoop.conf.Configuration conf)
public static String getConfValueForRMInstance(String prefix, String defaultValue, org.apache.hadoop.conf.Configuration conf)
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.