public class FifoRpcScheduler extends RpcScheduler
RpcScheduler} that serves incoming requests in order.
This can be used for HMaster, where no prioritization is needed.RpcScheduler.Context
Constructor and Description |
---|
FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf,
int handlerCount) |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(CallRunner task)
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(RpcScheduler.Context context)
Does some quick initialization.
|
void |
start()
Prepares for request serving.
|
void |
stop()
Stops serving new requests.
|
public FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf, int handlerCount)
public void init(RpcScheduler.Context context)
RpcScheduler
RpcScheduler.start()
. This method is called before start
.init
in class RpcScheduler
context
- provides methods to retrieve runtime information frompublic void start()
RpcScheduler
start
in class RpcScheduler
public void stop()
RpcScheduler
stop
in class RpcScheduler
public void dispatch(CallRunner task) throws IOException, InterruptedException
RpcScheduler
dispatch
in class RpcScheduler
task
- the request to be dispatchedIOException
InterruptedException
public int getGeneralQueueLength()
RpcScheduler
getGeneralQueueLength
in class RpcScheduler
public int getPriorityQueueLength()
RpcScheduler
getPriorityQueueLength
in class RpcScheduler
public int getReplicationQueueLength()
RpcScheduler
getReplicationQueueLength
in class RpcScheduler
public int getActiveRpcHandlerCount()
RpcScheduler
getActiveRpcHandlerCount
in class RpcScheduler
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.