Package org.apache.accumulo.core.client
Interface PluginEnvironment.Configuration
- All Known Subinterfaces:
ServiceEnvironment.Configuration
- Enclosing interface:
- PluginEnvironment
- Since:
- 2.1.0
-
Method Summary
Modifier and TypeMethodDescriptionUsers can set arbitrary custom properties in Accumulo using the prefixgeneral.custom.
.This method appends the prefixgeneral.custom
and gets the property.<T> Supplier<T>
getDerived
(Function<PluginEnvironment.Configuration, T> computeDerivedValue) Returns a derived value from this Configuration.Users can set arbitrary custom table properties in Accumulo using the prefixtable.custom.
.getTableCustom
(String keySuffix) This method appends the prefixtable.custom
and gets the property.getWithPrefix
(String prefix) Returns all properties with a given prefixboolean
Properties with a default value will always return something when callingget(String)
, even if a user never set the property.iterator()
Returns an iterator over all properties.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
isSet
Properties with a default value will always return something when callingget(String)
, even if a user never set the property. The method allows checking if a user set a property.- Returns:
- true if a user set this property and false if a user did not set it.
- Since:
- 2.1.0
-
get
- Returns:
- The value for a single property or null if not present. Sensitive properties are intentionally not returned in order to prevent inadvertent logging of them. If your plugin needs sensitive properties a getSensitive method could be added.
-
getWithPrefix
Returns all properties with a given prefix- Parameters:
prefix
- prefix of properties to be returned. Include the trailing '.' in the prefix.- Returns:
- all properties with a given prefix
- Since:
- 2.1.0
-
getCustom
Users can set arbitrary custom properties in Accumulo using the prefixgeneral.custom.
. This method will return all properties with that prefix, stripping the prefix. For example, assume the following properties were set :general.custom.prop1=123 general.custom.prop2=abc
[prop1=123,prop2=abc]
. -
getCustom
This method appends the prefixgeneral.custom
and gets the property.- Returns:
- The same as calling
getCustom().get(keySuffix)
ORget("general.custom."+keySuffix)
-
getTableCustom
Users can set arbitrary custom table properties in Accumulo using the prefixtable.custom.
. This method will return all properties with that prefix, stripping the prefix. For example, assume the following properties were set :table.custom.tp1=ch1 table.custom.tp2=bh2
[tp1=ch1,tp2=bh2]
. -
getTableCustom
This method appends the prefixtable.custom
and gets the property.- Returns:
- The same as calling
getTableCustom().get(keySuffix)
ORget("table.custom."+keySuffix)
-
iterator
Returns an iterator over all properties. This may be inefficient, consider opening an issue if you have a use case that is only satisfied by this. Sensitive properties are intentionally suppressed in order to prevent inadvertent logging of them. -
getDerived
Returns a derived value from this Configuration. The returned value supplier is thread-safe and attempts to avoid re-computation of the response. The intended use for a derived value is to ensure that configuration changes that may be made in Zookeeper, for example, are always reflected in the returned value.
-