public class ConfigUtils extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
BOOLEAN_DEFAULT |
static float |
FLOAT_DEFAULT |
static int |
INT_DEFAULT |
static long |
LONG_DEFAULT |
static java.lang.String |
STRING_DEFAULT |
| Constructor and Description |
|---|
ConfigUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends java.lang.Exception> |
checkAndSetDisallowedProperties(org.apache.hadoop.conf.Configuration base,
java.lang.String newValue,
E toThrow,
boolean performWrite)
Check
Configuration whether it contains disallowed properties. |
static java.lang.String |
getOozieEffectiveUrl()
Returns the HTTP or HTTPS URL for this Oozie server depending on which is actually configured
|
static java.lang.String |
getOozieURL(boolean secure)
Returns the HTTP or HTTPS URL for this Oozie server
(http://HOSTNAME:HTTP_PORT/oozie or https://HOSTNAME:HTTPS_PORT/oozie)
|
static boolean |
getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf,
java.lang.String newName,
java.lang.String oldName,
boolean defaultValue)
Fetches a property using both a deprecated name and the new name.
|
static java.lang.String |
getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf,
java.lang.String newName,
java.lang.String oldName,
java.lang.String defaultValue)
Fetches a property using both a deprecated name and the new name.
|
static boolean |
isBackwardSupportForCoordStatus() |
public static boolean BOOLEAN_DEFAULT
public static java.lang.String STRING_DEFAULT
public static int INT_DEFAULT
public static float FLOAT_DEFAULT
public static long LONG_DEFAULT
public ConfigUtils()
public static java.lang.String getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf, java.lang.String newName, java.lang.String oldName, java.lang.String defaultValue)
conf - configuration object.newName - new property name.oldName - deprecated property name.defaultValue - default value.public static boolean getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf, java.lang.String newName, java.lang.String oldName, boolean defaultValue)
conf - configuration object.newName - new property name.oldName - deprecated property name.defaultValue - default value.public static java.lang.String getOozieURL(boolean secure)
secure - true to return the HTTPS URL or false to return the HTTP URLpublic static java.lang.String getOozieEffectiveUrl()
public static boolean isBackwardSupportForCoordStatus()
public static <E extends java.lang.Exception> void checkAndSetDisallowedProperties(org.apache.hadoop.conf.Configuration base, java.lang.String newValue, E toThrow, boolean performWrite) throws E extends java.lang.Exception
Configuration whether it contains disallowed properties. Given configuration property values of
oozie-site.xml#oozie.configuration.check-and-set.DISALLOWED.PROPERTY_KEY, newValue and performWrite
values, one of the following will happen:
base doesn't contain any disallowed property: NOPbase contains a disallowed property but its value is the same as newValue: NOPbase contains a conflicting disallowed property and configuration tells we should also set, but
performWrite=false: NOPbase contains a conflicting disallowed property and configuration tells we should also set, and
performWrite=true: base will be overwritten by key=newValuebase contains a conflicting disallowed property and configuration tells we should not set:
Exception toThrow is thrownE - Exception typebase - the Configuration to checknewValue - the new value to assign if performWrite=true and if configuration value
oozie.configuration.check-and-set.* is settoThrow - the Exception to throw when oozie.configuration.check-and-set.* is unsetperformWrite - E - the Exception to throw when oozie.configuration.check-and-set.* is unsetE extends java.lang.ExceptionCopyright © 2019 Apache Software Foundation. All Rights Reserved.