Class ClientServiceEnvironmentImpl
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.ClientServiceEnvironmentImpl
-
- All Implemented Interfaces:
PluginEnvironment
,ServiceEnvironment
public class ClientServiceEnvironmentImpl extends Object implements ServiceEnvironment
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.common.ServiceEnvironment
ServiceEnvironment.Configuration
-
-
Constructor Summary
Constructors Constructor Description ClientServiceEnvironmentImpl(ClientContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceEnvironment.Configuration
getConfiguration()
ServiceEnvironment.Configuration
getConfiguration(TableId tableId)
String
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.
-
-
-
Constructor Detail
-
ClientServiceEnvironmentImpl
public ClientServiceEnvironmentImpl(ClientContext context)
-
-
Method Detail
-
getConfiguration
public ServiceEnvironment.Configuration getConfiguration()
- Specified by:
getConfiguration
in interfacePluginEnvironment
- Specified by:
getConfiguration
in interfaceServiceEnvironment
- 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
public ServiceEnvironment.Configuration getConfiguration(TableId tableId)
- Specified by:
getConfiguration
in interfacePluginEnvironment
- Specified by:
getConfiguration
in interfaceServiceEnvironment
- 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 asServiceEnvironment.getConfiguration()
.
-
getTableName
public String getTableName(TableId tableId) throws TableNotFoundException
Description copied from interface:PluginEnvironment
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.- Specified by:
getTableName
in interfacePluginEnvironment
- Throws:
TableNotFoundException
-
instantiate
public <T> T instantiate(String className, Class<T> base) throws ReflectiveOperationException, IOException
Description copied from interface:PluginEnvironment
Instantiate a class using Accumulo's system classloader. The class must have a no argument constructor.- Specified by:
instantiate
in interfacePluginEnvironment
- Parameters:
className
- Fully qualified name of the class.base
- The expected super type of the class.- Throws:
ReflectiveOperationException
IOException
-
instantiate
public <T> T instantiate(TableId tableId, String className, Class<T> base) throws ReflectiveOperationException, IOException
Description copied from interface:PluginEnvironment
Instantiate a class using Accumulo's per table classloader. The class must have a no argument constructor.- Specified by:
instantiate
in interfacePluginEnvironment
className
- Fully qualified name of the class.base
- The expected super type of the class.- Throws:
ReflectiveOperationException
IOException
-
-