org.apache.oozie.util
Class ConfigUtils

java.lang.Object
  extended by org.apache.oozie.util.ConfigUtils

public class ConfigUtils
extends Object


Constructor Summary
ConfigUtils()
           
 
Method Summary
static String getOozieEffectiveUrl()
          Returns the HTTP or HTTPS URL for this Oozie server depending on which is actually configured
static 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, String newName, String oldName, boolean defaultValue)
          Fetches a property using both a deprecated name and the new name.
static String getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf, String newName, String oldName, String defaultValue)
          Fetches a property using both a deprecated name and the new name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigUtils

public ConfigUtils()
Method Detail

getWithDeprecatedCheck

public static String getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf,
                                            String newName,
                                            String oldName,
                                            String defaultValue)
Fetches a property using both a deprecated name and the new name. The deprecated property has precedence over the new name. If the deprecated name is used a warning is written to the log.

Parameters:
conf - configuration object.
newName - new property name.
oldName - deprecated property name.
defaultValue - default value.
Returns:
the property value, or the default value if not found under the deprecated name and the new name.

getWithDeprecatedCheck

public static boolean getWithDeprecatedCheck(org.apache.hadoop.conf.Configuration conf,
                                             String newName,
                                             String oldName,
                                             boolean defaultValue)
Fetches a property using both a deprecated name and the new name. The deprecated property has precedence over the new name. If the deprecated name is used a warning is written to the log.

Parameters:
conf - configuration object.
newName - new property name.
oldName - deprecated property name.
defaultValue - default value.
Returns:
the property value, or the default value if not found under the deprecated name and the new name.

getOozieURL

public static 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)

Parameters:
secure - true to return the HTTPS URL or false to return the HTTP URL
Returns:
the HTTP or HTTPS URL for this Oozie server

getOozieEffectiveUrl

public static String getOozieEffectiveUrl()
Returns the HTTP or HTTPS URL for this Oozie server depending on which is actually configured

Returns:
the HTTP or HTTPS URL for this Oozie server


Copyright © 2015 Apache Software Foundation. All Rights Reserved.