protected void updateMethodCountAndSizeByQueue(BlockingQueue<Runnable> queue,
    HashMap<String, Long> methodCount, HashMap<String, Long> methodSize) {
    for (Runnable r : queue) {
      FifoCallRunner mcr = (FifoCallRunner) r;
      RpcCall rpcCall = mcr.getCallRunner().getRpcCall();

      String method = getCallMethod(mcr.getCallRunner());
      if (StringUtil.isNullOrEmpty(method)) {
        method = "Unknown";
      }

      long size = rpcCall.getSize();

      methodCount.put(method, 1 + methodCount.getOrDefault(method, 0L));
      methodSize.put(method, size + methodSize.getOrDefault(method, 0L));
    }
  }
A very simple {@code }RpcScheduler} that serves incoming requests in order. This can be used for
HMaster, where no prioritization is needed.
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java