ndimiduk commented on a change in pull request #754: HBASE-22978 : Online slow
response log
URL: https://github.com/apache/hbase/pull/754#discussion_r371445755
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3889,4 +3890,72 @@ private void getProcedureResult(long procId,
CompletableFuture<Void> future, int
.call();
}
+ @Override
+ public CompletableFuture<List<SlowLogPayload>>
getSlowLogResponses(List<ServerName> serverNames)
+ throws IOException {
+ CompletableFuture<List<SlowLogPayload>> slowLoadPayloads = null;
+ if (CollectionUtils.isNotEmpty(serverNames)) {
+ for (ServerName serverName : serverNames) {
+ CompletableFuture<List<SlowLogPayload>> slowLogPayloadFromServer =
+ getSlowLogResponseFromServer(serverName);
+ if (slowLoadPayloads == null) {
+ slowLoadPayloads = slowLogPayloadFromServer;
+ continue;
+ }
+ slowLoadPayloads =
slowLoadPayloads.thenCombine(slowLogPayloadFromServer, (l1, l2) -> {
+ List<SlowLogPayload> finalSlowLogPayloads = new ArrayList<>();
Review comment:
We have no clue what the length of these lists will be? How do we expect the
caller to consume the results? Should this be a `LinkedList` instead?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services