use of org.apache.hadoop.hbase.namequeues.BalancerRejectionDetails in project hbase by apache.
the class BalancerRejectionQueueService method consumeEventFromDisruptor.
@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);
}
Aggregations