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
  • Method Details

    • 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 as getConfiguration().
    • 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