org.apache.hadoop.hbase.ipc
Class FifoRpcScheduler

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.RpcScheduler
      extended by org.apache.hadoop.hbase.ipc.FifoRpcScheduler

public class FifoRpcScheduler
extends RpcScheduler

A very simple RpcScheduler} that serves incoming requests in order. This can be used for HMaster, where no prioritization is needed.


Constructor Summary
FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf, int handlerCount)
           
 
Method Summary
 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(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
 

Constructor Detail

FifoRpcScheduler

public FifoRpcScheduler(org.apache.hadoop.conf.Configuration conf,
                        int handlerCount)
Method Detail

init

public void init(org.apache.hadoop.hbase.ipc.RpcScheduler.Context context)
Description copied from class: RpcScheduler
Does some quick initialization. Heavy tasks (e.g. starting threads) should be done in RpcScheduler.start(). This method is called before start.

Specified by:
init in class RpcScheduler
Parameters:
context - provides methods to retrieve runtime information from

start

public void start()
Description copied from class: RpcScheduler
Prepares for request serving. An implementation may start some handler threads here.

Specified by:
start in class RpcScheduler

stop

public void stop()
Description copied from class: RpcScheduler
Stops serving new requests.

Specified by:
stop in class RpcScheduler

dispatch

public void dispatch(CallRunner task)
              throws IOException,
                     InterruptedException
Description copied from class: RpcScheduler
Dispatches an RPC request asynchronously. An implementation is free to choose to process the request immediately or delay it for later processing.

Specified by:
dispatch in class RpcScheduler
Parameters:
task - the request to be dispatched
Throws:
IOException
InterruptedException

getGeneralQueueLength

public int getGeneralQueueLength()
Description copied from class: RpcScheduler
Retrieves length of the general queue for metrics.

Specified by:
getGeneralQueueLength in class RpcScheduler

getPriorityQueueLength

public int getPriorityQueueLength()
Description copied from class: RpcScheduler
Retrieves length of the priority queue for metrics.

Specified by:
getPriorityQueueLength in class RpcScheduler

getReplicationQueueLength

public int getReplicationQueueLength()
Description copied from class: RpcScheduler
Retrieves length of the replication queue for metrics.

Specified by:
getReplicationQueueLength in class RpcScheduler

getActiveRpcHandlerCount

public int getActiveRpcHandlerCount()
Description copied from class: RpcScheduler
Retrieves the number of active handler.

Specified by:
getActiveRpcHandlerCount in class RpcScheduler


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.