org.apache.hadoop.hdfs
Class HdfsConfiguration

java.lang.Object
  extended by org.apache.hadoop.conf.Configuration
      extended by org.apache.hadoop.hdfs.HdfsConfiguration
All Implemented Interfaces:
Iterable<Map.Entry<String,String>>, org.apache.hadoop.io.Writable

@InterfaceAudience.Private
public class HdfsConfiguration
extends org.apache.hadoop.conf.Configuration

Adds deprecated keys into the configuration.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration
org.apache.hadoop.conf.Configuration.IntegerRanges
 
Constructor Summary
HdfsConfiguration()
           
HdfsConfiguration(boolean loadDefaults)
           
HdfsConfiguration(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
static void init()
          This method is here so that when invoked, HdfsConfiguration is class-loaded if it hasn't already been previously loaded.
 
Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addDeprecation, addDeprecation, addResource, addResource, addResource, addResource, clear, dumpConfiguration, get, get, getBoolean, getClass, getClass, getClassByName, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getEnum, getFile, getFloat, getInstances, getInt, getLocalPath, getLong, getPattern, getProps, getRange, getRaw, getResource, getStringCollection, getStrings, getStrings, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, iterator, main, readFields, reloadConfiguration, set, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setStrings, size, toString, write, writeXml, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HdfsConfiguration

public HdfsConfiguration()

HdfsConfiguration

public HdfsConfiguration(boolean loadDefaults)

HdfsConfiguration

public HdfsConfiguration(org.apache.hadoop.conf.Configuration conf)
Method Detail

init

public static void init()
This method is here so that when invoked, HdfsConfiguration is class-loaded if it hasn't already been previously loaded. Upon loading the class, the static initializer block above will be executed to add the deprecated keys and to add the default resources. It is safe for this method to be called multiple times as the static initializer block will only get invoked once. This replaces the previously, dangerous practice of other classes calling Configuration.addDefaultResource("hdfs-default.xml") directly without loading HdfsConfiguration class first, thereby skipping the key deprecation



Copyright © 2009 The Apache Software Foundation