Java org.apache.hadoop.conf Configuration fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.conf Configuration fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.conf Configuration.

The text is from its open source code.

Subclass

org.apache.hadoop.conf.Configuration has subclasses.
Click this link to see all its subclasses.

Constructor

Configuration()
A new configuration.
Configuration(boolean loadDefaults)
A new configuration where the behavior of reading from the default resources can be turned off.
Configuration(Configuration other)
A new configuration with the same settings cloned from another.

Method

voidaddDefaultResource(String name)
Add a default resource.
voidaddDeprecation(String key, String[] newKeys)
Adds the deprecated key to the global deprecation map when no custom message is provided.
voidaddDeprecation(String key, String newKey)
Adds the deprecated key to the global deprecation map when no custom message is provided.
voidaddDeprecation(String key, String[] newKeys, String customMessage)
Adds the deprecated key to the global deprecation map.
voidaddDeprecation(String key, String newKey, String customMessage)
Adds the deprecated key to the global deprecation map.
voidaddResource(String name)
Add a configuration resource.
voidaddResource(URL url)
Add a configuration resource.
voidaddResource(Path file)
Add a configuration resource.
voidaddResource(InputStream in)
Add a configuration resource.
voidaddResource(Configuration conf)
Add a configuration resource.
voidaddResource(String name, boolean restrictedParser)
voidaddResource(URL url, boolean restrictedParser)
voidaddResource(Path file, boolean restrictedParser)
voidaddResource(InputStream in, boolean restrictedParser)
voidaddResource(InputStream in, String name)
Add a configuration resource.
voidclear()
Clears all keys from the configuration.
voiddumpConfiguration(Configuration config, Writer out)
Writes out all properties and their attributes (final and resource) to the given Writer , the format of the output would be,
 { "properties" : [ { key : "key1", value : "value1", isFinal : "key1.isFinal", resource : "key1.resource" }, { key : "key2", value : "value2", isFinal : "ke2.isFinal", resource : "key2.resource" } ] } 
It does not output the properties of the configuration object which is loaded from an input stream.
voiddumpDeprecatedKeys()
Stringget(String name)
Get the value of the name property, null if no such property exists.
Stringget(String name, String defaultValue)
Get the value of the name.
booleangetBoolean(String name, boolean defaultValue)
Get the value of the name property as a boolean.
ClassgetClass(String name, Class defaultValue)
Get the value of the name property as a Class.
ClassgetClass(String name, Class defaultValue, Class xface)
Get the value of the name property as a Class implementing the interface specified by xface.
ClassgetClassByName(String name)
Load a class by name.
ClassgetClassByNameOrNull(String name)
Load a class by name, returning null rather than throwing an exception if it couldn't be loaded.
Class[]getClasses(String name, Class... defaultValue)
Get the value of the name property as an array of Class.
ClassLoadergetClassLoader()
Get the ClassLoader for this job.
InputStreamgetConfResourceAsInputStream(String name)
Get an input stream attached to the configuration resource with the given name.
ReadergetConfResourceAsReader(String name)
Get a Reader attached to the configuration resource with the given name.
doublegetDouble(String name, double defaultValue)
Get the value of the name property as a double.
TgetEnum(String name, T defaultValue)
Return value matching this enumerated type.
floatgetFloat(String name, float defaultValue)
Get the value of the name property as a float.
ListgetInstances(String name, Class xface)
Get the value of the name property as a List of objects implementing the interface specified by xface.
intgetInt(String name, int defaultValue)
Get the value of the name property as an int.
int[]getInts(String name)
Get the value of the name property as a set of comma-delimited int values.
longgetLong(String name, long defaultValue)
Get the value of the name property as a long.
longgetLongBytes(String name, long defaultValue)
Get the value of the name property as a long or human readable format.
char[]getPassword(String name)
Get the value for a known password configuration element.
PatterngetPattern(String name, Pattern defaultValue)
Get the value of the name property as a Pattern.
StringgetProperty(String key)
String[]getPropertySources(String name)
Gets information about why a property was set.
MapgetPropsWithPrefix(String confPrefix)
Constructs a mapping of configuration and includes all properties that start with the specified configuration prefix.
IntegerRangesgetRange(String name, String defaultValue)
Parse the given attribute as a set of integer ranges
StringgetRaw(String name)
Get the value of the name property, without doing variable expansion.If the key is deprecated, it returns the value of the first key which replaces the deprecated key and is not null.
URLgetResource(String name)
Get the URL for the named resource.
InetSocketAddressgetSocketAddr(String name, String defaultAddress, int defaultPort)
Get the socket address for name property as a InetSocketAddress.
InetSocketAddressgetSocketAddr(String hostProperty, String addressProperty, String defaultAddressValue, int defaultPort)
Get the socket address for hostProperty as a InetSocketAddress.
CollectiongetStringCollection(String name)
Get the comma delimited values of the name property as a collection of Strings.
String[]getStrings(String name)
Get the comma delimited values of the name property as an array of Strings.
String[]getStrings(String name, String... defaultValue)
Get the comma delimited values of the name property as an array of Strings.
StringgetTrimmed(String name, String defaultValue)
Get the value of the name property as a trimmed String, defaultValue if no such property exists.
StringgetTrimmed(String name)
Get the value of the name property as a trimmed String, null if no such property exists.
CollectiongetTrimmedStringCollection(String name)
Get the comma delimited values of the name property as a collection of Strings, trimmed of the leading and trailing whitespace.
String[]getTrimmedStrings(String name)
Get the comma delimited values of the name property as an array of Strings, trimmed of the leading and trailing whitespace.
String[]getTrimmedStrings(String name, String... defaultValue)
Get the comma delimited values of the name property as an array of Strings, trimmed of the leading and trailing whitespace.
MapgetValByRegex(String regex)
get keys matching the the regex
booleanisDeprecated(String key)
checks whether the given key is deprecated.
Iterator>iterator()
Get an Iterator to go through the list of String key-value pairs in the configuration.
voidmain(String[] args)
For debugging.
voidreadFields(DataInput in)
voidreloadConfiguration()
Reload configuration from previously added resources.
voidset(String name, String value)
Set the value of the name property.
voidsetBoolean(String name, boolean value)
Set the value of the name property to a boolean.
voidsetBooleanIfUnset(String name, boolean value)
Set the given property, if it is currently unset.
voidsetClass(String name, Class theClass, Class xface)
Set the value of the name property to the name of a theClass implementing the given interface xface.
voidsetClassLoader(ClassLoader classLoader)
Set the class loader that will be used to load the various objects.
voidsetDouble(String name, double value)
Set the value of the name property to a double.
voidsetEnum(String name, T value)
Set the value of the name property to the given type.
voidsetFloat(String name, float value)
Set the value of the name property to a float.
voidsetIfUnset(String name, String value)
Sets a property if it is currently unset.
voidsetInt(String name, int value)
Set the value of the name property to an int.
voidsetLong(String name, long value)
Set the value of the name property to a long.
voidsetPattern(String name, Pattern pattern)
Set the given property to Pattern.
voidsetQuietMode(boolean quietmode)
Set the quietness-mode.
voidsetSocketAddr(String name, InetSocketAddress addr)
Set the socket address for the name property as a host:port.
voidsetStrings(String name, String... values)
Set the array of string values for the name property as as comma delimited values.
voidsetTimeDuration(String name, long value, TimeUnit unit)
Set the value of name to the given time duration.
intsize()
Return the number of keys in the configuration.
StringtoString()
voidunset(String name)
Unset a previously set property.
voidwrite(DataOutput out)
voidwriteXml(OutputStream out)
Write out the non-default properties in this configuration to the given OutputStream using UTF-8 encoding.
voidwriteXml(Writer out)