|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.conf.Configuration
org.apache.hadoop.hbase.CompoundConfiguration
@InterfaceAudience.Private public class CompoundConfiguration
Do a shallow merge of multiple KV configuration pools. This is a very useful utility class to easily add per-object configurations in addition to wider scope settings. This is different from Configuration.addResource() functionality, which performs a deep merge and mutates the common data structure.
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration |
|---|
org.apache.hadoop.conf.Configuration.IntegerRanges |
| Field Summary | |
|---|---|
protected List<org.apache.hadoop.hbase.CompoundConfiguration.ImmutableConfigMap> |
configs
|
| Constructor Summary | |
|---|---|
CompoundConfiguration()
Default Constructor. |
|
| Method Summary | ||
|---|---|---|
CompoundConfiguration |
add(org.apache.hadoop.conf.Configuration conf)
Add Hadoop Configuration object to config list. |
|
CompoundConfiguration |
addStringMap(Map<String,String> map)
Add String map to config list. |
|
CompoundConfiguration |
addWritableMap(Map<ImmutableBytesWritable,ImmutableBytesWritable> map)
Add ImmutableBytesWritable map to config list. |
|
void |
clear()
This class is immutable. |
|
String |
get(String key)
|
|
String |
get(String name,
String defaultValue)
You should just ignore everything below this line unless there's a bug in Configuration.java... |
|
boolean |
getBoolean(String name,
boolean defaultValue)
|
|
Class<?> |
getClass(String name,
Class<?> defaultValue)
|
|
|
getClass(String name,
Class<? extends U> defaultValue,
Class<U> xface)
|
|
Class<?> |
getClassByName(String name)
|
|
Class<?>[] |
getClasses(String name,
Class<?>... defaultValue)
|
|
float |
getFloat(String name,
float defaultValue)
|
|
protected String |
getHexDigits(String value)
|
|
int |
getInt(String name,
int defaultValue)
|
|
long |
getLong(String name,
long defaultValue)
|
|
org.apache.hadoop.conf.Configuration.IntegerRanges |
getRange(String name,
String defaultValue)
|
|
String |
getRaw(String key)
|
|
Collection<String> |
getStringCollection(String name)
|
|
String[] |
getStrings(String name)
|
|
String[] |
getStrings(String name,
String... defaultValue)
|
|
Iterator<Map.Entry<String,String>> |
iterator()
|
|
void |
readFields(DataInput in)
|
|
void |
set(String name,
String value)
|
|
void |
setBoolean(String name,
boolean value)
|
|
void |
setBooleanIfUnset(String name,
boolean value)
|
|
void |
setClass(String name,
Class<?> theClass,
Class<?> xface)
|
|
void |
setClassLoader(ClassLoader classLoader)
|
|
void |
setFloat(String name,
float value)
|
|
void |
setIfUnset(String name,
String value)
|
|
void |
setInt(String name,
int value)
|
|
void |
setLong(String name,
long value)
|
|
void |
setStrings(String name,
String... values)
|
|
int |
size()
|
|
String |
toString()
|
|
void |
write(DataOutput out)
|
|
void |
writeXml(OutputStream out)
|
|
| Methods inherited from class org.apache.hadoop.conf.Configuration |
|---|
addDefaultResource, addResource, addResource, addResource, addResource, dumpConfiguration, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getEnum, getFile, getInstances, getLocalPath, getResource, getValByRegex, main, reloadConfiguration, setEnum, setQuietMode, writeXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List<org.apache.hadoop.hbase.CompoundConfiguration.ImmutableConfigMap> configs
| Constructor Detail |
|---|
public CompoundConfiguration()
| Method Detail |
|---|
public CompoundConfiguration add(org.apache.hadoop.conf.Configuration conf)
conf - configuration object
public CompoundConfiguration addWritableMap(Map<ImmutableBytesWritable,ImmutableBytesWritable> map)
map - ImmutableBytesWritable map
public CompoundConfiguration addStringMap(Map<String,String> map)
public String toString()
toString in class org.apache.hadoop.conf.Configurationpublic String get(String key)
get in class org.apache.hadoop.conf.Configurationpublic String getRaw(String key)
getRaw in class org.apache.hadoop.conf.Configuration
public Class<?> getClassByName(String name)
throws ClassNotFoundException
getClassByName in class org.apache.hadoop.conf.ConfigurationClassNotFoundExceptionpublic int size()
size in class org.apache.hadoop.conf.Configuration
public String get(String name,
String defaultValue)
get in class org.apache.hadoop.conf.Configuration
public int getInt(String name,
int defaultValue)
getInt in class org.apache.hadoop.conf.Configuration
public long getLong(String name,
long defaultValue)
getLong in class org.apache.hadoop.conf.Configurationprotected String getHexDigits(String value)
public float getFloat(String name,
float defaultValue)
getFloat in class org.apache.hadoop.conf.Configuration
public boolean getBoolean(String name,
boolean defaultValue)
getBoolean in class org.apache.hadoop.conf.Configuration
public org.apache.hadoop.conf.Configuration.IntegerRanges getRange(String name,
String defaultValue)
getRange in class org.apache.hadoop.conf.Configurationpublic Collection<String> getStringCollection(String name)
getStringCollection in class org.apache.hadoop.conf.Configurationpublic String[] getStrings(String name)
getStrings in class org.apache.hadoop.conf.Configuration
public String[] getStrings(String name,
String... defaultValue)
getStrings in class org.apache.hadoop.conf.Configuration
public Class<?>[] getClasses(String name,
Class<?>... defaultValue)
getClasses in class org.apache.hadoop.conf.Configuration
public Class<?> getClass(String name,
Class<?> defaultValue)
getClass in class org.apache.hadoop.conf.Configuration
public <U> Class<? extends U> getClass(String name,
Class<? extends U> defaultValue,
Class<U> xface)
getClass in class org.apache.hadoop.conf.Configurationpublic void clear()
clear in class org.apache.hadoop.conf.Configurationpublic Iterator<Map.Entry<String,String>> iterator()
iterator in interface Iterable<Map.Entry<String,String>>iterator in class org.apache.hadoop.conf.Configuration
public void set(String name,
String value)
set in class org.apache.hadoop.conf.Configuration
public void setIfUnset(String name,
String value)
setIfUnset in class org.apache.hadoop.conf.Configuration
public void setInt(String name,
int value)
setInt in class org.apache.hadoop.conf.Configuration
public void setLong(String name,
long value)
setLong in class org.apache.hadoop.conf.Configuration
public void setFloat(String name,
float value)
setFloat in class org.apache.hadoop.conf.Configuration
public void setBoolean(String name,
boolean value)
setBoolean in class org.apache.hadoop.conf.Configuration
public void setBooleanIfUnset(String name,
boolean value)
setBooleanIfUnset in class org.apache.hadoop.conf.Configuration
public void setStrings(String name,
String... values)
setStrings in class org.apache.hadoop.conf.Configuration
public void setClass(String name,
Class<?> theClass,
Class<?> xface)
setClass in class org.apache.hadoop.conf.Configurationpublic void setClassLoader(ClassLoader classLoader)
setClassLoader in class org.apache.hadoop.conf.Configuration
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class org.apache.hadoop.conf.ConfigurationIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class org.apache.hadoop.conf.ConfigurationIOException
public void writeXml(OutputStream out)
throws IOException
writeXml in class org.apache.hadoop.conf.ConfigurationIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||