You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/10/11 11:44:26 UTC

[GitHub] [hbase] nyl3532016 commented on a change in pull request #3690: HBASE-26045 Master control the global throughput of all compaction servers

nyl3532016 commented on a change in pull request #3690:
URL: https://github.com/apache/hbase/pull/3690#discussion_r726041989



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
##########
@@ -3822,6 +3824,26 @@ private void getProcedureResult(long procId, CompletableFuture<Void> future, int
     return future;
   }
 
+  @Override
+  public CompletableFuture<Map<String, Long>> updateCompactionServerTotalThroughput(long upperBound,
+      long lowerBound, long offPeak) {
+    CompletableFuture<Map<String, Long>> future = this.<Map<String, Long>> newMasterCaller().action(
+      (controller, stub) -> this.<UpdateCompactionServerTotalThroughputRequest,
+        UpdateCompactionServerTotalThroughputResponse, Map<String, Long>> call(
+            controller, stub, UpdateCompactionServerTotalThroughputRequest.newBuilder()
+                .setMaxThroughputUpperBound(upperBound).setMaxThroughputLowerBound(lowerBound)
+                .setMaxThroughputOffPeak(offPeak).build(),
+          (s, c, req, done) -> s.updateCompactionServerTotalThroughput(c, req, done), resp -> {
+            Map<String, Long> result = new HashMap<>();
+            result.put("UpperBound", resp.getMaxThroughputUpperBound());

Review comment:
       we only need get/set total throughput (the sum value of upperBound, LowerBound and offpeakBound). we do not care the throughput of each compaction server. And introduce a new class is better than return a Map?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org