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
Modifier and TypeFieldDescriptionprivate ClassLoader
private org.apache.hadoop.conf.Configuration
The coprocessorprivate static final org.slf4j.Logger
protected int
Chaining priorityprivate int
(package private) Coprocessor.State
Current coprocessor state -
Constructor Summary
ConstructorDescriptionBaseEnvironment
(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.Configuration
Returns a Read-only Configuration; throwsUnsupportedOperationException
if you try to set a configuration.Returns the HBase releaseReturns the loaded coprocessor instanceint
Returns the load sequence numberint
Returns the priority assigned to the loaded coprocessorint
Returns the coprocessor environment versionvoid
shutdown()
Clean up the environmentvoid
startup()
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:CoprocessorEnvironment
Returns the loaded coprocessor instance- Specified by:
getInstance
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getClassLoader
Description copied from interface:CoprocessorEnvironment
Returns the classloader for the loaded coprocessor instance- Specified by:
getClassLoader
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getPriority
Description copied from interface:CoprocessorEnvironment
Returns the priority assigned to the loaded coprocessor- Specified by:
getPriority
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getLoadSequence
Description copied from interface:CoprocessorEnvironment
Returns the load sequence number- Specified by:
getLoadSequence
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getVersion
Returns the coprocessor environment version- Specified by:
getVersion
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getHBaseVersion
Returns the HBase release- Specified by:
getHBaseVersion
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-
getConfiguration
Description copied from interface:CoprocessorEnvironment
Returns a Read-only Configuration; throwsUnsupportedOperationException
if you try to set a configuration.- Specified by:
getConfiguration
in interfaceCoprocessorEnvironment<C extends Coprocessor>
-