public abstract class AccumuloConfiguration extends Object implements Iterable<Map.Entry<String,String>>
Modifier and Type | Class and Description |
---|---|
class |
AccumuloConfiguration.ScanExecutorConfig |
Constructor and Description |
---|
AccumuloConfiguration() |
Modifier and Type | Method and Description |
---|---|
abstract String |
get(Property property)
Gets a property value from this configuration.
|
String |
get(String property)
Gets a property value from this configuration.
|
Map<String,String> |
getAllPropertiesWithPrefix(Property property)
Gets all properties under the given prefix in this configuration.
|
long |
getAsBytes(Property property)
Gets a property of type
PropertyType.BYTES or PropertyType.MEMORY , interpreting
the value properly. |
boolean |
getBoolean(Property property)
Gets a property of type
PropertyType.BOOLEAN , interpreting the value properly (using
Boolean.parseBoolean() ). |
int |
getCount(Property property)
Gets a property of type
PropertyType.COUNT , interpreting the value properly (as an
integer). |
double |
getFraction(Property property)
Gets a property of type
PropertyType.FRACTION , interpreting the value properly. |
int |
getMaxFilesPerTablet()
Gets the maximum number of files per tablet from this configuration.
|
String |
getPath(Property property)
Gets a property of type
PropertyType.PATH , interpreting the value properly, replacing
supported environment variables. |
int[] |
getPort(Property property)
Gets a property of type
PropertyType.PORT , interpreting the value properly (as an
integer within the range of non-privileged ports). |
abstract void |
getProperties(Map<String,String> props,
Predicate<String> filter)
Returns property key/value pairs in this configuration.
|
Collection<AccumuloConfiguration.ScanExecutorConfig> |
getScanExecutors() |
long |
getTimeInMillis(Property property)
Gets a property of type
PropertyType.TIMEDURATION , interpreting the value properly. |
long |
getUpdateCount()
Each time configuration changes, this counter should increase.
|
void |
invalidateCache()
Invalidates the
ZooCache used for storage and quick retrieval of properties for
this configuration. |
boolean |
isPropertySet(Property prop) |
Iterator<Map.Entry<String,String>> |
iterator()
Returns an iterator over property key/value pairs in this configuration.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public String get(String property)
Note: this is inefficient, but convenient on occasion. For retrieving multiple properties, use
getProperties(Map, Predicate)
with a custom filter.
property
- property to getpublic abstract String get(Property property)
property
- property to getpublic abstract void getProperties(Map<String,String> props, Predicate<String> filter)
props
- properties object to populatefilter
- filter for accepting properties from this configurationpublic Iterator<Map.Entry<String,String>> iterator()
public long getUpdateCount()
public Map<String,String> getAllPropertiesWithPrefix(Property property)
property
- prefix property, must be of type PropertyType.PREFIXIllegalArgumentException
- if property is not a prefixpublic long getAsBytes(Property property)
PropertyType.BYTES
or PropertyType.MEMORY
, interpreting
the value properly.property
- Property to getIllegalArgumentException
- if the property is of the wrong typepublic long getTimeInMillis(Property property)
PropertyType.TIMEDURATION
, interpreting the value properly.property
- property to getIllegalArgumentException
- if the property is of the wrong typepublic boolean getBoolean(Property property)
PropertyType.BOOLEAN
, interpreting the value properly (using
Boolean.parseBoolean()
).property
- property to getIllegalArgumentException
- if the property is of the wrong typepublic double getFraction(Property property)
PropertyType.FRACTION
, interpreting the value properly.property
- property to getIllegalArgumentException
- if the property is of the wrong typepublic int[] getPort(Property property)
PropertyType.PORT
, interpreting the value properly (as an
integer within the range of non-privileged ports).property
- property to getIllegalArgumentException
- if the property is of the wrong typepublic int getCount(Property property)
PropertyType.COUNT
, interpreting the value properly (as an
integer).property
- property to getIllegalArgumentException
- if the property is of the wrong typepublic String getPath(Property property)
PropertyType.PATH
, interpreting the value properly, replacing
supported environment variables.property
- property to getIllegalArgumentException
- if the property is of the wrong typeConstants.PATH_PROPERTY_ENV_VARS
public int getMaxFilesPerTablet()
Property.TABLE_FILE_MAX
,
Property.TSERV_SCAN_MAX_OPENFILES
public boolean isPropertySet(Property prop)
public Collection<AccumuloConfiguration.ScanExecutorConfig> getScanExecutors()
public void invalidateCache()
ZooCache
used for storage and quick retrieval of properties for
this configuration.Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.