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 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.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.