|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.CoprocessorHost<E>
E
- the specific environment extension that a concrete implementation
providespublic abstract class CoprocessorHost<E extends CoprocessorEnvironment>
Provides the common setup framework and runtime services for coprocessor invocation from HBase services.
Nested Class Summary | |
---|---|
static class |
CoprocessorHost.Environment
Encapsulation of the environment of each coprocessor |
Field Summary | |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected SortedSet<E> |
coprocessors
Ordered set of loaded coprocessors with lock |
protected int |
loadSequence
|
static String |
MASTER_COPROCESSOR_CONF_KEY
|
protected String |
pathPrefix
|
static String |
REGION_COPROCESSOR_CONF_KEY
|
static String |
USER_REGION_COPROCESSOR_CONF_KEY
|
static String |
WAL_COPROCESSOR_CONF_KEY
|
Constructor Summary | |
---|---|
CoprocessorHost()
|
Method Summary | |
---|---|
protected void |
abortServer(CoprocessorEnvironment environment,
Throwable e)
|
protected void |
abortServer(String service,
Server server,
CoprocessorEnvironment environment,
Throwable e)
|
abstract E |
createEnvironment(Class<?> implClass,
Coprocessor instance,
int priority,
int sequence,
org.apache.hadoop.conf.Configuration conf)
Called when a new Coprocessor class is loaded |
Coprocessor |
findCoprocessor(String className)
Find a coprocessor implementation by class name |
CoprocessorEnvironment |
findCoprocessorEnvironment(String className)
Find a coprocessor environment by class name |
Set<String> |
getCoprocessors()
Used to create a parameter to the HServerLoad constructor so that HServerLoad can provide information about the coprocessors loaded by this regionserver. |
static Set<String> |
getLoadedCoprocessors()
|
protected void |
handleCoprocessorThrowable(CoprocessorEnvironment env,
Throwable e)
This is used by coprocessor hooks which are declared to throw IOException (or its subtypes). |
void |
load(Class<?> implClass,
int priority,
org.apache.hadoop.conf.Configuration conf)
|
E |
load(org.apache.hadoop.fs.Path path,
String className,
int priority,
org.apache.hadoop.conf.Configuration conf)
Load a coprocessor implementation into the host |
E |
loadInstance(Class<?> implClass,
int priority,
org.apache.hadoop.conf.Configuration conf)
|
protected void |
loadSystemCoprocessors(org.apache.hadoop.conf.Configuration conf,
String confKey)
Load system coprocessors. |
void |
shutdown(CoprocessorEnvironment e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REGION_COPROCESSOR_CONF_KEY
public static final String USER_REGION_COPROCESSOR_CONF_KEY
public static final String MASTER_COPROCESSOR_CONF_KEY
public static final String WAL_COPROCESSOR_CONF_KEY
protected SortedSet<E extends CoprocessorEnvironment> coprocessors
protected org.apache.hadoop.conf.Configuration conf
protected String pathPrefix
protected volatile int loadSequence
Constructor Detail |
---|
public CoprocessorHost()
Method Detail |
---|
public static Set<String> getLoadedCoprocessors()
public Set<String> getCoprocessors()
protected void loadSystemCoprocessors(org.apache.hadoop.conf.Configuration conf, String confKey)
public E load(org.apache.hadoop.fs.Path path, String className, int priority, org.apache.hadoop.conf.Configuration conf) throws IOException
path
- path to implementation jarclassName
- the main class namepriority
- chaining priorityconf
- configuration for coprocessor
IOException
- Exceptionpublic void load(Class<?> implClass, int priority, org.apache.hadoop.conf.Configuration conf) throws IOException
implClass
- Implementation classpriority
- priorityconf
- configuration
IOException
- Exceptionpublic E loadInstance(Class<?> implClass, int priority, org.apache.hadoop.conf.Configuration conf) throws IOException
implClass
- Implementation classpriority
- priorityconf
- configuration
IOException
- Exceptionpublic abstract E createEnvironment(Class<?> implClass, Coprocessor instance, int priority, int sequence, org.apache.hadoop.conf.Configuration conf)
public void shutdown(CoprocessorEnvironment e)
public Coprocessor findCoprocessor(String className)
className
- the class name
public CoprocessorEnvironment findCoprocessorEnvironment(String className)
className
- the class name
protected void abortServer(String service, Server server, CoprocessorEnvironment environment, Throwable e)
protected void abortServer(CoprocessorEnvironment environment, Throwable e)
protected void handleCoprocessorThrowable(CoprocessorEnvironment env, Throwable e) throws IOException
env
- Coprocessor Environmente
- Throwable object thrown by coprocessor.
IOException
- Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |