|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.ipc.RpcScheduler
org.apache.hadoop.hbase.ipc.SimpleRpcScheduler
@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"})
@InterfaceStability.Evolving
public class SimpleRpcSchedulerA scheduler that maintains isolated handler pools for general, high-priority and replication requests.
| Field Summary | |
|---|---|
static String |
CALL_QUEUE_HANDLER_FACTOR_CONF_KEY
|
static String |
CALL_QUEUE_MAX_LENGTH_CONF_KEY
|
static String |
CALL_QUEUE_READ_SHARE_CONF_KEY
|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
SimpleRpcScheduler(org.apache.hadoop.conf.Configuration conf,
int handlerCount,
int priorityHandlerCount,
int replicationHandlerCount,
PriorityFunction priority,
Abortable abortable,
int highPriorityLevel)
|
|
| Method Summary | |
|---|---|
void |
dispatch(CallRunner callTask)
Dispatches an RPC request asynchronously. |
int |
getActiveRpcHandlerCount()
Retrieves the number of active handler. |
int |
getGeneralQueueLength()
Retrieves length of the general queue for metrics. |
int |
getPriorityQueueLength()
Retrieves length of the priority queue for metrics. |
int |
getReplicationQueueLength()
Retrieves length of the replication queue for metrics. |
void |
init(org.apache.hadoop.hbase.ipc.RpcScheduler.Context context)
Does some quick initialization. |
void |
start()
Prepares for request serving. |
void |
stop()
Stops serving new requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
public static final String CALL_QUEUE_READ_SHARE_CONF_KEY
public static final String CALL_QUEUE_HANDLER_FACTOR_CONF_KEY
public static final String CALL_QUEUE_MAX_LENGTH_CONF_KEY
| Constructor Detail |
|---|
public SimpleRpcScheduler(org.apache.hadoop.conf.Configuration conf,
int handlerCount,
int priorityHandlerCount,
int replicationHandlerCount,
PriorityFunction priority,
Abortable abortable,
int highPriorityLevel)
conf - handlerCount - the number of handler threads that will be used to process callspriorityHandlerCount - How many threads for priority handling.replicationHandlerCount - How many threads for replication handling.highPriorityLevel - priority - Function to extract request priority.| Method Detail |
|---|
public void init(org.apache.hadoop.hbase.ipc.RpcScheduler.Context context)
RpcSchedulerRpcScheduler.start(). This method is called before start.
init in class RpcSchedulercontext - provides methods to retrieve runtime information frompublic void start()
RpcScheduler
start in class RpcSchedulerpublic void stop()
RpcScheduler
stop in class RpcScheduler
public void dispatch(CallRunner callTask)
throws InterruptedException
RpcScheduler
dispatch in class RpcSchedulercallTask - the request to be dispatched
InterruptedExceptionpublic int getGeneralQueueLength()
RpcScheduler
getGeneralQueueLength in class RpcSchedulerpublic int getPriorityQueueLength()
RpcScheduler
getPriorityQueueLength in class RpcSchedulerpublic int getReplicationQueueLength()
RpcScheduler
getReplicationQueueLength in class RpcSchedulerpublic int getActiveRpcHandlerCount()
RpcScheduler
getActiveRpcHandlerCount in class RpcScheduler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||