@Override
  public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload) {
    if (!isBalancerRejectionRecording) {
      return;
    }
    if (!(namedQueuePayload instanceof BalancerRejectionDetails)) {
      LOG.warn("BalancerRejectionQueueService: NamedQueuePayload is not of type"
        + " BalancerRejectionDetails.");
      return;
    }
    BalancerRejectionDetails balancerRejectionDetails =
      (BalancerRejectionDetails) namedQueuePayload;
    BalancerRejection balancerRejectionRecord = balancerRejectionDetails.getBalancerRejection();
    RecentLogs.BalancerRejection BalancerRejection =
      RecentLogs.BalancerRejection.newBuilder().setReason(balancerRejectionRecord.getReason())
        .addAllCostFuncInfo(balancerRejectionRecord.getCostFuncInfoList()).build();
    balancerRejectionQueue.add(BalancerRejection);
  }
In-memory Queue service provider for Balancer Rejection events
hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/BalancerRejectionQueueService.java