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 first loads any properties set on the command-line (using the -o option) and then from accumulo.properties. This implementation supports defaulting undefined property values to a parent configuration's definitions.The system property "accumulo.properties" can be used to specify the location of the properties file on the classpath or filesystem if the path is prefixed with 'file://'. If the system property is not defined, it defaults to "accumulo.properties" and will look on classpath for file.
Note: Client code should not use this class, and it may be deprecated in the future.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SiteConfiguration.Buildable
static interface
SiteConfiguration.OverridesOption
-
Nested classes/interfaces inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
AccumuloConfiguration.Deriver<T>, AccumuloConfiguration.ScanExecutorConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SiteConfiguration
auto()
Build a SiteConfiguration from the environmental configuration and no overrides.static SiteConfiguration.OverridesOption
empty()
Build a SiteConfiguration that is initially empty with the option to override.static SiteConfiguration.OverridesOption
fromEnv()
Build a SiteConfiguration from the environmental configuration with the option to override.static SiteConfiguration.OverridesOption
fromFile(File propertiesFileLocation)
Build a SiteConfiguration from the provided properties file with the option to override.String
get(Property property)
Gets a property value from this configuration.AccumuloConfiguration
getParent()
get a parent configuration or null if it does not exist.void
getProperties(Map<String,String> props, Predicate<String> filter)
Returns property key/value pairs in this configuration.void
getProperties(Map<String,String> props, Predicate<String> filter, boolean useDefaults)
boolean
isPropertySet(Property prop)
-
Methods inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
get, getAllCryptoProperties, getAllPropertiesWithPrefix, getAllPropertiesWithPrefixStripped, getAsBytes, getBoolean, getCount, getFraction, getMaxFilesPerTablet, getPath, getPort, getPortStream, getScanExecutors, getTimeInMillis, getUpdateCount, invalidateCache, iterator, newDeriver, resolve, stream
-
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
-
fromEnv
public static SiteConfiguration.OverridesOption fromEnv()
Build a SiteConfiguration from the environmental configuration with the option to override.
-
fromFile
public static SiteConfiguration.OverridesOption fromFile(File propertiesFileLocation)
Build a SiteConfiguration from the provided properties file with the option to override.
-
empty
public static SiteConfiguration.OverridesOption empty()
Build a SiteConfiguration that is initially empty with the option to override.
-
auto
public static SiteConfiguration auto()
Build a SiteConfiguration from the environmental configuration and no overrides.
-
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
-
isPropertySet
public boolean isPropertySet(Property prop)
- Specified by:
isPropertySet
in classAccumuloConfiguration
-
getProperties
public void getProperties(Map<String,String> props, 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
-
getProperties
public void getProperties(Map<String,String> props, Predicate<String> filter, boolean useDefaults)
-
getParent
public AccumuloConfiguration getParent()
Description copied from class:AccumuloConfiguration
get a parent configuration or null if it does not exist.- Overrides:
getParent
in classAccumuloConfiguration
-
-