@InterfaceAudience.Private
public class CompoundConfiguration
extends org.apache.hadoop.conf.Configuration
The iterator on CompoundConfiguration is unmodifiable. Obtaining iterator is an expensive operation.
For clarity: the shallow merge allows the user to mutate either of the configuration objects and have changes reflected everywhere. In contrast to a deep merge, that requires you to explicitly know all applicable copies to propagate changes. WARNING: The values set in the CompoundConfiguration are do not handle Property variable substitution. However, if they are set in the underlying configuration substitutions are done.
构造器和说明 |
---|
CompoundConfiguration()
Default Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
CompoundConfiguration |
add(org.apache.hadoop.conf.Configuration conf)
Add Hadoop Configuration object to config list.
|
CompoundConfiguration |
addBytesMap(Map<Bytes,Bytes> map)
Add Bytes map to config list.
|
CompoundConfiguration |
addStringMap(Map<String,String> map)
Add String map to config list.
|
void |
clear()
These methods are unsupported, and no code using CompoundConfiguration depend upon them.
|
String |
get(String key) |
String |
get(String name,
String defaultValue)
Get the value of the
name . |
Class<?> |
getClassByName(String name) |
String |
getRaw(String key) |
Iterator<Map.Entry<String,String>> |
iterator() |
void |
set(String name,
String value) |
int |
size() |
String |
toString() |
void |
write(DataOutput out) |
void |
writeXml(OutputStream out) |
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, dumpConfiguration, dumpConfiguration, dumpDeprecatedKeys, getBoolean, getClass, getClass, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getFile, getFinalParameters, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPassword, getPasswordFromConfig, getPasswordFromCredentialProviders, getPattern, getPropertySources, getProps, getPropsWithPrefix, getRange, getResource, getSocketAddr, getSocketAddr, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setRestrictSystemProperties, setRestrictSystemPropertiesDefault, setRestrictSystemProps, setSocketAddr, setStrings, setTimeDuration, unset, updateConnectAddr, updateConnectAddr, writeXml, writeXml
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public CompoundConfiguration()
public CompoundConfiguration add(org.apache.hadoop.conf.Configuration conf)
conf
- configuration objectpublic CompoundConfiguration addBytesMap(Map<Bytes,Bytes> map)
map
- Bytes mappublic CompoundConfiguration addStringMap(Map<String,String> map)
public String toString()
toString
在类中 org.apache.hadoop.conf.Configuration
public Class<?> getClassByName(String name) throws ClassNotFoundException
getClassByName
在类中 org.apache.hadoop.conf.Configuration
ClassNotFoundException
public int size()
size
在类中 org.apache.hadoop.conf.Configuration
public String get(String name, String defaultValue)
name
. If the key is deprecated,
it returns the value of the first key which replaces the deprecated key
and is not null.
If no such property exists,
then defaultValue
is returned.
The CompooundConfiguration does not do property substitution. To do so we need
Configuration.getProps to be protected or package visible. Though in hadoop2 it is
protected, in hadoop1 the method is private and not accessible.
All of the get* methods call this overridden get method.get
在类中 org.apache.hadoop.conf.Configuration
name
- property name.defaultValue
- default value.defaultValue
if the property
doesn't exist.public void clear()
clear
在类中 org.apache.hadoop.conf.Configuration
public void write(DataOutput out) throws IOException
write
在接口中 org.apache.hadoop.io.Writable
write
在类中 org.apache.hadoop.conf.Configuration
IOException
public void writeXml(OutputStream out) throws IOException
writeXml
在类中 org.apache.hadoop.conf.Configuration
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.