Search in sources :

Example 1 with BalancerRejectionDetails

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);
}
Also used : BalancerRejection(org.apache.hadoop.hbase.client.BalancerRejection) RecentLogs(org.apache.hadoop.hbase.shaded.protobuf.generated.RecentLogs) BalancerRejectionDetails(org.apache.hadoop.hbase.namequeues.BalancerRejectionDetails)

Aggregations

BalancerRejection (org.apache.hadoop.hbase.client.BalancerRejection)1 BalancerRejectionDetails (org.apache.hadoop.hbase.namequeues.BalancerRejectionDetails)1 RecentLogs (org.apache.hadoop.hbase.shaded.protobuf.generated.RecentLogs)1