public class SiteConfiguration extends AccumuloConfiguration
AccumuloConfiguration
which loads properties from an XML file, usually accumulo-site.xml. This implementation supports defaulting undefined
property values to a parent configuration's definitions.
The system property "org.apache.accumulo.config.file" can be used to specify the location of the XML configuration file on the classpath. If the system property is not defined, it defaults to "accumulo-site.xml".
This class is a singleton.
Note: Client code should not use this class, and it may be deprecated in the future.
AccumuloConfiguration.MatchFilter, AccumuloConfiguration.PrefixFilter, AccumuloConfiguration.PropertyFilter
Modifier and Type | Method and Description |
---|---|
static void |
clearInstance()
Clears the configuration properties in this configuration (but not the parent).
|
String |
get(Property property)
Gets a property value from this configuration.
|
protected org.apache.hadoop.conf.Configuration |
getHadoopConfiguration() |
static SiteConfiguration |
getInstance() |
static SiteConfiguration |
getInstance(AccumuloConfiguration parent)
Gets an instance of this class.
|
void |
getProperties(Map<String,String> props,
com.google.common.base.Predicate<String> filter)
Returns property key/value pairs in this configuration.
|
void |
set(Property property,
String value)
Sets a property.
|
void |
set(String key,
String value)
Sets a property.
|
get, getAllPropertiesWithPrefix, getBoolean, getCount, getDefaultConfiguration, getFraction, getFraction, getMaxFilesPerTablet, getMemoryInBytes, getMemoryInBytes, getPath, getPort, getTableConfiguration, getTimeInMillis, getTimeInMillis, instantiateClassProperty, invalidateCache, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static SiteConfiguration getInstance(AccumuloConfiguration parent)
parent
- parent (default) configurationRuntimeException
- if the configuration is invalidpublic static SiteConfiguration getInstance()
public String get(Property property)
AccumuloConfiguration
get
in class AccumuloConfiguration
property
- property to getpublic void getProperties(Map<String,String> props, com.google.common.base.Predicate<String> filter)
AccumuloConfiguration
getProperties
in class AccumuloConfiguration
props
- properties object to populatefilter
- filter for accepting properties from this configurationprotected org.apache.hadoop.conf.Configuration getHadoopConfiguration()
public static void clearInstance()
public void set(Property property, String value)
property
- property to setvalue
- property valueCopyright © 2011–2017 The Apache Software Foundation. All rights reserved.