private List<LogEntry> getBalancerRejectionLogEntries(MasterClusterInfoProvider provider) {
    NamedQueueGetRequest namedQueueGetRequest = new NamedQueueGetRequest();
    namedQueueGetRequest.setNamedQueueEvent(BalancerRejectionDetails.BALANCER_REJECTION_EVENT);
    namedQueueGetRequest
      .setBalancerRejectionsRequest(MasterProtos.BalancerRejectionsRequest.getDefaultInstance());
    NamedQueueGetResponse namedQueueGetResponse =
      provider.getNamedQueueRecorder().getNamedQueueRecords(namedQueueGetRequest);
    List<RecentLogs.BalancerRejection> balancerRejections =
      namedQueueGetResponse.getBalancerRejections();
    MasterProtos.BalancerRejectionsResponse response = MasterProtos.BalancerRejectionsResponse
      .newBuilder().addAllBalancerRejection(balancerRejections).build();
    List<LogEntry> balancerRejectionRecords = ProtobufUtil.getBalancerRejectionEntries(response);
    return balancerRejectionRecords;
  }
Test BalancerRejection ring buffer using namedQueue interface
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBalancerRejection.java