|
||||||||||
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
provides@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public 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 | |
---|---|
static String |
ABORT_ON_ERROR_KEY
|
protected Abortable |
abortable
|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected SortedList<E> |
coprocessors
Ordered set of loaded coprocessors with lock |
static String |
COPROCESSORS_ENABLED_CONF_KEY
|
static boolean |
DEFAULT_ABORT_ON_ERROR
|
static boolean |
DEFAULT_COPROCESSORS_ENABLED
|
static boolean |
DEFAULT_USER_COPROCESSORS_ENABLED
|
protected AtomicInteger |
loadSequence
|
protected static org.apache.commons.logging.Log |
LOG
|
static String |
MASTER_COPROCESSOR_CONF_KEY
|
protected String |
pathPrefix
|
static String |
REGION_COPROCESSOR_CONF_KEY
|
static String |
REGIONSERVER_COPROCESSOR_CONF_KEY
|
static String |
USER_COPROCESSORS_ENABLED_CONF_KEY
|
static String |
USER_REGION_COPROCESSOR_CONF_KEY
|
static String |
WAL_COPROCESSOR_CONF_KEY
|
Constructor Summary | |
---|---|
CoprocessorHost(Abortable abortable)
|
Method Summary | ||
---|---|---|
protected void |
abortServer(CoprocessorEnvironment environment,
Throwable e)
|
|
protected void |
abortServer(String coprocessorName,
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 |
|
|
findCoprocessors(Class<T> cls)
Find list of coprocessors that extend/implement the given class/interface |
|
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 once only. |
|
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 REGIONSERVER_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
public static final String ABORT_ON_ERROR_KEY
public static final boolean DEFAULT_ABORT_ON_ERROR
public static final String COPROCESSORS_ENABLED_CONF_KEY
public static final boolean DEFAULT_COPROCESSORS_ENABLED
public static final String USER_COPROCESSORS_ENABLED_CONF_KEY
public static final boolean DEFAULT_USER_COPROCESSORS_ENABLED
protected static final org.apache.commons.logging.Log LOG
protected Abortable abortable
protected SortedList<E extends CoprocessorEnvironment> coprocessors
protected org.apache.hadoop.conf.Configuration conf
protected String pathPrefix
protected AtomicInteger loadSequence
Constructor Detail |
---|
public CoprocessorHost(Abortable abortable)
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 <T extends Coprocessor> List<T> findCoprocessors(Class<T> cls)
cls
- the class/interface to look for
public CoprocessorEnvironment findCoprocessorEnvironment(String className)
className
- the class name
protected void abortServer(CoprocessorEnvironment environment, Throwable e)
protected void abortServer(String coprocessorName, 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 |