@Override
  public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload) {
    if (!isOnlineLogProviderEnabled) {
      return;
    }
    if (!(namedQueuePayload instanceof RpcLogDetails)) {
      LOG.warn("SlowLogQueueService: NamedQueuePayload is not of type RpcLogDetails.");
      return;
    }
    final RpcLogDetails rpcLogDetails = (RpcLogDetails) namedQueuePayload;
    final RpcCall rpcCall = rpcLogDetails.getRpcCall();
    final String clientAddress = rpcLogDetails.getClientAddress();
    final long responseSize = rpcLogDetails.getResponseSize();
    final long blockBytesScanned = rpcLogDetails.getBlockBytesScanned();
    final long fsReadTime = rpcLogDetails.getFsReadTime();
    final String className = rpcLogDetails.getClassName();
    final TooSlowLog.SlowLogPayload.Type type = getLogType(rpcLogDetails);
    if (type == null) {
      return;
    }
    Descriptors.MethodDescriptor methodDescriptor = rpcCall.getMethod();
    Message param = rpcLogDetails.getParam();
    long receiveTime = rpcCall.getReceiveTime();
    long startTime = rpcCall.getStartTime();
    long endTime = EnvironmentEdgeManager.currentTime();
    int processingTime = (int) (endTime - startTime);
    int qTime = (int) (startTime - receiveTime);
    final SlowLogParams slowLogParams =
      ProtobufUtil.getSlowLogParams(param, slowLogScanPayloadEnabled);
    int numGets = 0;
    int numMutations = 0;
    int numServiceCalls = 0;
    if (param instanceof ClientProtos.MultiRequest) {
      ClientProtos.MultiRequest multi = (ClientProtos.MultiRequest) param;
      for (ClientProtos.RegionAction regionAction : multi.getRegionActionList()) {
        for (ClientProtos.Action action : regionAction.getActionList()) {
          if (action.hasMutation()) {
            numMutations++;
          }
          if (action.hasGet()) {
            numGets++;
          }
          if (action.hasServiceCall()) {
            numServiceCalls++;
          }
        }
      }
    }
    final String userName = rpcCall.getRequestUserName().orElse(StringUtils.EMPTY);
    final String methodDescriptorName =
      methodDescriptor != null ? methodDescriptor.getName() : StringUtils.EMPTY;
    TooSlowLog.SlowLogPayload.Builder slowLogPayloadBuilder = TooSlowLog.SlowLogPayload.newBuilder()
      .setCallDetails(methodDescriptorName + "(" + param.getClass().getName() + ")")
      .setClientAddress(clientAddress).setMethodName(methodDescriptorName).setMultiGets(numGets)
      .setMultiMutations(numMutations).setMultiServiceCalls(numServiceCalls)
      .setParam(slowLogParams != null ? slowLogParams.getParams() : StringUtils.EMPTY)
      .setProcessingTime(processingTime).setQueueTime(qTime)
      .setRegionName(slowLogParams != null ? slowLogParams.getRegionName() : StringUtils.EMPTY)
      .setResponseSize(responseSize).setBlockBytesScanned(blockBytesScanned)
      .setFsReadTime(fsReadTime).setServerClass(className).setStartTime(startTime).setType(type)
      .setUserName(userName)
      .addAllRequestAttribute(buildNameBytesPairs(rpcLogDetails.getRequestAttributes()))
      .addAllConnectionAttribute(buildNameBytesPairs(rpcLogDetails.getConnectionAttributes()));
    if (slowLogParams != null && slowLogParams.getScan() != null) {
      slowLogPayloadBuilder.setScan(slowLogParams.getScan());
    }
    TooSlowLog.SlowLogPayload slowLogPayload = slowLogPayloadBuilder.build();
    slowLogQueue.add(slowLogPayload);
    if (isSlowLogTableEnabled) {
      if (!slowLogPayload.getRegionName().startsWith("hbase:slowlog")) {
        slowLogPersistentService.addToQueueForSysTable(slowLogPayload);
      }
    }
  }
This implementation is specific to slowLog event. This consumes slowLog event from disruptor
and inserts records to EvictingQueue.
@param namedQueuePayload namedQueue payload from disruptor ring buffer
hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java