public static class CoprocessorHost.Environment extends Object implements CoprocessorEnvironment
| Modifier and Type | Field and Description |
|---|---|
Coprocessor |
impl
The coprocessor
|
protected List<HTableInterface> |
openTables
Accounting for tables opened by the coprocessor
|
protected int |
priority
Chaining priority
|
| 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
protected List<HTableInterface> openTables
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
IOExceptionprotected void shutdown()
public Coprocessor getInstance()
getInstance in interface CoprocessorEnvironmentpublic ClassLoader getClassLoader()
getClassLoader in interface CoprocessorEnvironmentpublic int getPriority()
getPriority in interface CoprocessorEnvironmentpublic int getLoadSequence()
getLoadSequence in interface CoprocessorEnvironmentpublic int getVersion()
getVersion in interface CoprocessorEnvironmentpublic String getHBaseVersion()
getHBaseVersion in interface CoprocessorEnvironmentpublic org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration in interface CoprocessorEnvironmentpublic HTableInterface getTable(TableName tableName) throws IOException
getTable in interface CoprocessorEnvironmenttableName - the table nameIOException - Exceptionpublic HTableInterface getTable(TableName tableName, ExecutorService pool) throws IOException
getTable in interface CoprocessorEnvironmenttableName - the table nameIOException - ExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.