public static class CoprocessorHost.Environment extends Object implements CoprocessorEnvironment
Modifier and Type | Field and Description |
---|---|
private ClassLoader |
classLoader |
private org.apache.hadoop.conf.Configuration |
conf |
Coprocessor |
impl
The coprocessor
|
protected List<HTableInterface> |
openTables
Accounting for tables opened by the coprocessor
|
protected int |
priority
Chaining priority
|
private int |
seq |
(package private) Coprocessor.State |
state
Current coprocessor state
|
Constructor and Description |
---|
CoprocessorHost.Environment(Coprocessor impl,
int priority,
int seq,
org.apache.hadoop.conf.Configuration conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getClassLoader() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
String |
getHBaseVersion() |
Coprocessor |
getInstance() |
int |
getLoadSequence() |
int |
getPriority() |
HTableInterface |
getTable(TableName tableName)
Open a table from within the Coprocessor environment
|
HTableInterface |
getTable(TableName tableName,
ExecutorService pool)
Open a table from within the Coprocessor environment
|
int |
getVersion() |
protected void |
shutdown()
Clean up the environment
|
void |
startup()
Initialize the environment
|
public Coprocessor impl
protected int priority
Coprocessor.State state
protected List<HTableInterface> openTables
private int seq
private org.apache.hadoop.conf.Configuration conf
private ClassLoader classLoader
public CoprocessorHost.Environment(Coprocessor impl, int priority, int seq, org.apache.hadoop.conf.Configuration conf)
impl
- the coprocessor instancepriority
- chaining prioritypublic void startup() throws IOException
IOException
protected void shutdown()
public Coprocessor getInstance()
getInstance
in interface CoprocessorEnvironment
public ClassLoader getClassLoader()
getClassLoader
in interface CoprocessorEnvironment
public int getPriority()
getPriority
in interface CoprocessorEnvironment
public int getLoadSequence()
getLoadSequence
in interface CoprocessorEnvironment
public int getVersion()
getVersion
in interface CoprocessorEnvironment
public String getHBaseVersion()
getHBaseVersion
in interface CoprocessorEnvironment
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface CoprocessorEnvironment
public HTableInterface getTable(TableName tableName) throws IOException
getTable
in interface CoprocessorEnvironment
tableName
- the table nameIOException
- Exceptionpublic HTableInterface getTable(TableName tableName, ExecutorService pool) throws IOException
getTable
in interface CoprocessorEnvironment
tableName
- the table nameIOException
- ExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.