Class BaseEnvironment<C extends Coprocessor>
java.lang.Object
org.apache.hadoop.hbase.coprocessor.BaseEnvironment<C>
- All Implemented Interfaces:
CoprocessorEnvironment<C>
- Direct Known Subclasses:
MasterCoprocessorHost.MasterEnvironment,RegionCoprocessorHost.RegionEnvironment,RegionServerCoprocessorHost.RegionServerEnvironment,WALCoprocessorHost.WALEnvironment
@Private
public class BaseEnvironment<C extends Coprocessor>
extends Object
implements CoprocessorEnvironment<C>
Encapsulation of the environment of each coprocessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ClassLoaderprivate org.apache.hadoop.conf.ConfigurationThe coprocessorprivate static final org.slf4j.Loggerprotected intChaining priorityprivate int(package private) Coprocessor.StateCurrent coprocessor state -
Constructor Summary
ConstructorsConstructorDescriptionBaseEnvironment(C impl, int priority, int seq, org.apache.hadoop.conf.Configuration conf) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the classloader for the loaded coprocessor instanceorg.apache.hadoop.conf.ConfigurationReturns a Read-only Configuration; throwsUnsupportedOperationExceptionif you try to set a configuration.Returns the HBase releaseReturns the loaded coprocessor instanceintReturns the load sequence numberintReturns the priority assigned to the loaded coprocessorintReturns the coprocessor environment versionvoidshutdown()Clean up the environmentvoidstartup()Initialize the environment
-
Field Details
-
LOG
-
impl
The coprocessor -
priority
Chaining priority -
state
Current coprocessor state -
seq
-
conf
-
classLoader
-
-
Constructor Details
-
BaseEnvironment
Constructor- Parameters:
impl- the coprocessor instancepriority- chaining priority
-
-
Method Details
-
startup
Initialize the environment- Throws:
IOException
-
shutdown
Clean up the environment -
getInstance
Description copied from interface:CoprocessorEnvironmentReturns the loaded coprocessor instance- Specified by:
getInstancein interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getClassLoader
Description copied from interface:CoprocessorEnvironmentReturns the classloader for the loaded coprocessor instance- Specified by:
getClassLoaderin interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getPriority
Description copied from interface:CoprocessorEnvironmentReturns the priority assigned to the loaded coprocessor- Specified by:
getPriorityin interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getLoadSequence
Description copied from interface:CoprocessorEnvironmentReturns the load sequence number- Specified by:
getLoadSequencein interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getVersion
Returns the coprocessor environment version- Specified by:
getVersionin interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getHBaseVersion
Returns the HBase release- Specified by:
getHBaseVersionin interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getConfiguration
Description copied from interface:CoprocessorEnvironmentReturns a Read-only Configuration; throwsUnsupportedOperationExceptionif you try to set a configuration.- Specified by:
getConfigurationin interfaceCoprocessorEnvironment<C extends Coprocessor>
-