@InterfaceAudience.Private public class BaseEnvironment<C extends Coprocessor> extends Object implements CoprocessorEnvironment<C>
Modifier and Type | Field and Description |
---|---|
private ClassLoader |
classLoader |
private org.apache.hadoop.conf.Configuration |
conf |
C |
impl
The coprocessor
|
private static org.slf4j.Logger |
LOG |
protected int |
priority
Chaining priority
|
private int |
seq |
(package private) Coprocessor.State |
state
Current coprocessor state
|
Constructor and Description |
---|
BaseEnvironment(C impl,
int priority,
int seq,
org.apache.hadoop.conf.Configuration conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader()
Returns the classloader for the loaded coprocessor instance
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Returns a Read-only Configuration; throws
UnsupportedOperationException if you try to
set a configuration. |
String |
getHBaseVersion()
Returns the HBase release
|
C |
getInstance()
Returns the loaded coprocessor instance
|
int |
getLoadSequence()
Returns the load sequence number
|
int |
getPriority()
Returns the priority assigned to the loaded coprocessor
|
int |
getVersion()
Returns the coprocessor environment version
|
void |
shutdown()
Clean up the environment
|
void |
startup()
Initialize the environment
|
private static final org.slf4j.Logger LOG
public C extends Coprocessor impl
protected int priority
Coprocessor.State state
private int seq
private org.apache.hadoop.conf.Configuration conf
private ClassLoader classLoader
public BaseEnvironment(C impl, int priority, int seq, org.apache.hadoop.conf.Configuration conf)
impl
- the coprocessor instancepriority
- chaining prioritypublic void startup() throws IOException
IOException
public void shutdown()
public C getInstance()
CoprocessorEnvironment
getInstance
in interface CoprocessorEnvironment<C extends Coprocessor>
public ClassLoader getClassLoader()
CoprocessorEnvironment
getClassLoader
in interface CoprocessorEnvironment<C extends Coprocessor>
public int getPriority()
CoprocessorEnvironment
getPriority
in interface CoprocessorEnvironment<C extends Coprocessor>
public int getLoadSequence()
CoprocessorEnvironment
getLoadSequence
in interface CoprocessorEnvironment<C extends Coprocessor>
public int getVersion()
getVersion
in interface CoprocessorEnvironment<C extends Coprocessor>
public String getHBaseVersion()
getHBaseVersion
in interface CoprocessorEnvironment<C extends Coprocessor>
public org.apache.hadoop.conf.Configuration getConfiguration()
CoprocessorEnvironment
UnsupportedOperationException
if you try to
set a configuration.getConfiguration
in interface CoprocessorEnvironment<C extends Coprocessor>
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.