Package org.apache.accumulo.core.client
Interface PluginEnvironment
- All Known Subinterfaces:
BalancerEnvironment
,ServiceEnvironment
public interface PluginEnvironment
This interface exposes Accumulo system level information to plugins in a stable manner. The
purpose of this interface is to insulate plugins from internal refactorings and changes to
Accumulo.
- Since:
- 2.1.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration
(TableId tableId) getTableName
(TableId tableId) Many Accumulo plugins are given table IDs as this is what Accumulo uses internally to identify tables.<T> T
instantiate
(String className, Class<T> base) Instantiate a class using Accumulo's system classloader.<T> T
instantiate
(TableId tableId, String className, Class<T> base) Instantiate a class using Accumulo's per table classloader.
-
Method Details
-
getConfiguration
PluginEnvironment.Configuration getConfiguration()- Returns:
- A view of Accumulo's system level configuration. This is backed by system level config in zookeeper, which falls back to site configuration, which falls back to the default configuration.
-
getConfiguration
- Returns:
- a view of a table's configuration. When requesting properties that start with
table.
the returned configuration may give different values for different tables. For other properties the returned configuration will return the same value asgetConfiguration()
.
-
getTableName
Many Accumulo plugins are given table IDs as this is what Accumulo uses internally to identify tables. If a plugin needs to log debugging information it can call this method to get the table name.- Throws:
TableNotFoundException
-
instantiate
Instantiate a class using Accumulo's system classloader. The class must have a no argument constructor.- Parameters:
className
- Fully qualified name of the class.base
- The expected super type of the class.- Throws:
Exception
-
instantiate
Instantiate a class using Accumulo's per table classloader. The class must have a no argument constructor.- Parameters:
className
- Fully qualified name of the class.base
- The expected super type of the class.- Throws:
Exception
-