HBASE-25884 Return empty records for disabled balancer in-memory queue (#3263)
Signed-off-by: stack <stack@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Aman Poonia <apoonia@salesforce.com>
This commit is contained in:
parent
1c829af56a
commit
112b58ad8c
|
@ -3080,8 +3080,9 @@ public class MasterRpcServices extends RSRpcServices implements
|
||||||
namedQueueGetRequest.setBalancerDecisionsRequest(request);
|
namedQueueGetRequest.setBalancerDecisionsRequest(request);
|
||||||
NamedQueueGetResponse namedQueueGetResponse =
|
NamedQueueGetResponse namedQueueGetResponse =
|
||||||
namedQueueRecorder.getNamedQueueRecords(namedQueueGetRequest);
|
namedQueueRecorder.getNamedQueueRecords(namedQueueGetRequest);
|
||||||
List<RecentLogs.BalancerDecision> balancerDecisions =
|
List<RecentLogs.BalancerDecision> balancerDecisions = namedQueueGetResponse != null ?
|
||||||
namedQueueGetResponse.getBalancerDecisions();
|
namedQueueGetResponse.getBalancerDecisions() :
|
||||||
|
Collections.emptyList();
|
||||||
return MasterProtos.BalancerDecisionsResponse.newBuilder()
|
return MasterProtos.BalancerDecisionsResponse.newBuilder()
|
||||||
.addAllBalancerDecision(balancerDecisions).build();
|
.addAllBalancerDecision(balancerDecisions).build();
|
||||||
}
|
}
|
||||||
|
@ -3098,8 +3099,9 @@ public class MasterRpcServices extends RSRpcServices implements
|
||||||
namedQueueGetRequest.setBalancerRejectionsRequest(request);
|
namedQueueGetRequest.setBalancerRejectionsRequest(request);
|
||||||
NamedQueueGetResponse namedQueueGetResponse =
|
NamedQueueGetResponse namedQueueGetResponse =
|
||||||
namedQueueRecorder.getNamedQueueRecords(namedQueueGetRequest);
|
namedQueueRecorder.getNamedQueueRecords(namedQueueGetRequest);
|
||||||
List<RecentLogs.BalancerRejection> balancerRejections =
|
List<RecentLogs.BalancerRejection> balancerRejections = namedQueueGetResponse != null ?
|
||||||
namedQueueGetResponse.getBalancerRejections();
|
namedQueueGetResponse.getBalancerRejections() :
|
||||||
|
Collections.emptyList();
|
||||||
return MasterProtos.BalancerRejectionsResponse.newBuilder()
|
return MasterProtos.BalancerRejectionsResponse.newBuilder()
|
||||||
.addAllBalancerRejection(balancerRejections).build();
|
.addAllBalancerRejection(balancerRejections).build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue