Package org.apache.accumulo.core.client
Interface PluginEnvironment
-
- All Known Subinterfaces:
ServiceEnvironment
public interface PluginEnvironmentThis 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
Nested Classes Modifier and Type Interface Description static interfacePluginEnvironment.Configuration
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PluginEnvironment.ConfigurationgetConfiguration()PluginEnvironment.ConfigurationgetConfiguration(TableId tableId)StringgetTableName(TableId tableId)Many Accumulo plugins are given table IDs as this is what Accumulo uses internally to identify tables.<T> Tinstantiate(String className, Class<T> base)Instantiate a class using Accumulo's system classloader.<T> Tinstantiate(TableId tableId, String className, Class<T> base)Instantiate a class using Accumulo's per table classloader.
-
-
-
Method Detail
-
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
PluginEnvironment.Configuration getConfiguration(TableId tableId)
- 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
String getTableName(TableId tableId) throws TableNotFoundException
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
<T> T instantiate(String className, Class<T> base) throws Exception
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
<T> T instantiate(TableId tableId, String className, Class<T> base) throws Exception
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
-
-