Package org.apache.accumulo.core.conf
Class SiteConfiguration
- java.lang.Object
-
- org.apache.accumulo.core.conf.AccumuloConfiguration
-
- org.apache.accumulo.core.conf.SiteConfiguration
-
public class SiteConfiguration extends AccumuloConfiguration
AnAccumuloConfiguration
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
AccumuloConfiguration.MatchFilter, AccumuloConfiguration.PrefixFilter, AccumuloConfiguration.PropertyFilter
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
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(String key, String value)
Sets a property.void
set(Property property, String value)
Sets a property.-
Methods inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
get, getAllPropertiesWithPrefix, getBoolean, getCount, getDefaultConfiguration, getFraction, getFraction, getMaxFilesPerTablet, getMemoryInBytes, getMemoryInBytes, getPath, getPort, getTableConfiguration, getTimeInMillis, getTimeInMillis, getUpdateCount, instantiateClassProperty, invalidateCache, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getInstance
public static SiteConfiguration getInstance()
Gets an instance of this class. A new instance is only created on the first call.- Throws:
RuntimeException
- if the configuration is invalid
-
get
public String get(Property property)
Description copied from class:AccumuloConfiguration
Gets a property value from this configuration.- Specified by:
get
in classAccumuloConfiguration
- Parameters:
property
- property to get- Returns:
- property value
-
getProperties
public void getProperties(Map<String,String> props, com.google.common.base.Predicate<String> filter)
Description copied from class:AccumuloConfiguration
Returns property key/value pairs in this configuration. The pairs include those defined in this configuration which pass the given filter, and those supplied from the parent configuration which are not included from here.- Specified by:
getProperties
in classAccumuloConfiguration
- Parameters:
props
- properties object to populatefilter
- filter for accepting properties from this configuration
-
getHadoopConfiguration
protected org.apache.hadoop.conf.Configuration getHadoopConfiguration()
-
clearInstance
public static void clearInstance()
Clears the configuration properties in this configuration (but not the parent). This method supports testing and should not be called.
-
set
public void set(Property property, String value)
Sets a property. This method supports testing and should not be called.- Parameters:
property
- property to setvalue
- property value
-
-