Package org.apache.accumulo.server.conf
Class ZooBasedConfiguration
java.lang.Object
org.apache.accumulo.core.conf.AccumuloConfiguration
org.apache.accumulo.server.conf.ZooBasedConfiguration
- Direct Known Subclasses:
NamespaceConfiguration
,SystemConfiguration
,TableConfiguration
Instances maintain a local cache of the AccumuloConfiguration hierarchy that will be consistent
with stored properties.
When calling getProperties - the local copy will be updated if ZooKeeper changes have been received.
The getUpdateCount() provides an optimization for clients - the count can be used to detect changes without reading the properties. When the update count changes, the next getProperties call will update the local copy and the change count.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
AccumuloConfiguration.Deriver<T extends Object>, AccumuloConfiguration.ScanExecutorConfig
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionZooBasedConfiguration
(org.slf4j.Logger log, ServerContext context, PropStoreKey<?> propStoreKey, AccumuloConfiguration parent) -
Method Summary
Modifier and TypeMethodDescription@Nullable String
long
void
PropStoreKey<?>
long
The update count is the sum of the change count of this configuration and the change counts of the parents.void
boolean
isPropertySet
(Property property) void
zkChangeEvent
(PropStoreKey<?> propStoreKey) Methods inherited from class org.apache.accumulo.core.conf.AccumuloConfiguration
get, getAllCryptoProperties, getAllPropertiesWithPrefix, getAllPropertiesWithPrefixStripped, getAsBytes, getBoolean, getCount, getFraction, getMaxFilesPerTablet, getPath, getPort, getPortStream, getScanExecutors, getTimeInMillis, 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
-
Field Details
-
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
ZooBasedConfiguration
public ZooBasedConfiguration(org.slf4j.Logger log, ServerContext context, PropStoreKey<?> propStoreKey, AccumuloConfiguration parent)
-
-
Method Details
-
zkChangeEvent
-
getDataVersion
public long getDataVersion() -
getUpdateCount
public long getUpdateCount()The update count is the sum of the change count of this configuration and the change counts of the parents. The count is used to detect if any changes occurred in the configuration hierarchy and if the configuration needs to be recalculated to maintain consistency with values in the backend store.The count is required to be an increasing value.
- Overrides:
getUpdateCount
in classAccumuloConfiguration
-
getParent
- Overrides:
getParent
in classAccumuloConfiguration
-
getPropStoreKey
-
get
- Specified by:
get
in classAccumuloConfiguration
-
getProperties
- Specified by:
getProperties
in classAccumuloConfiguration
-
isPropertySet
- Specified by:
isPropertySet
in classAccumuloConfiguration
-
getSnapshot
-
invalidateCache
public void invalidateCache()- Overrides:
invalidateCache
in classAccumuloConfiguration
-