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



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/PressureAwareThroughputController.java
##########
@@ -64,9 +64,9 @@
     }
   }
 
-  protected long maxThroughputUpperBound;
+  protected volatile long maxThroughputUpperBound;

Review comment:
       The two fields will be set separately, is it possible to have race which 
could introduce to unexpected behavior?

##########
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:
       This is a method in an IA.Public interface so end users could use it in 
the future...




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to