nyl3532016 commented on a change in pull request #3690:
URL: https://github.com/apache/hbase/pull/3690#discussion_r727759407
##########
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 old design recreate controller when conf change, It work correctly
for the change is rarely happen.
Once create a new controller, the previous compaction tasks still control by
the old controller.It means the actual throughput is controller num *
throughput per controller.
Here,the throughput of compaction server will change frequently(by status
report response from master), so we can not recreate new controller.
https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java#L414
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
##########
@@ -107,6 +107,15 @@ public MiniHBaseCluster(Configuration conf, int
numMasters, int numAlwaysStandBy
regionserverClass);
}
+ public MiniHBaseCluster(Configuration conf, int numMasters, int
numAlwaysStandByMasters,
Review comment:
OK, I will separate this issue
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
##########
@@ -1459,6 +1459,16 @@
*/
CompletableFuture<Boolean> switchCompactionOffload(boolean enable);
+ /**
+ * update compaction server total throughput bound
+ * @param upperBound the total throughput upper bound of all compaction
servers
+ * @param lowerBound the total throughput lower bound of all compaction
servers
+ * @param offPeak the total throughput offPeak bound of all compaction
servers
Review comment:
we have config "hbase.hstore.compaction.throughput.offpeak", the offpeak
throughput is a definite value, not lower or upper bound
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
##########
@@ -1459,6 +1459,16 @@
*/
CompletableFuture<Boolean> switchCompactionOffload(boolean enable);
+ /**
+ * update compaction server total throughput bound
+ * @param upperBound the total throughput upper bound of all compaction
servers
+ * @param lowerBound the total throughput lower bound of all compaction
servers
+ * @param offPeak the total throughput offPeak bound of all compaction
servers
Review comment:
I will modify this function param, but some variable not need change
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
##########
@@ -1459,6 +1459,16 @@
*/
CompletableFuture<Boolean> switchCompactionOffload(boolean enable);
+ /**
+ * update compaction server total throughput bound
+ * @param upperBound the total throughput upper bound of all compaction
servers
+ * @param lowerBound the total throughput lower bound of all compaction
servers
+ * @param offPeak the total throughput offPeak bound of all compaction
servers
Review comment:
I will modify this function param, but some variable like
`maxThroughputOffPeak` not need change
##########
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:
the return value of `updateCompactionServerTotalThroughput` only used by
hbase shell, and return this map is convenient to print result on console
https://github.com/apache/hbase/blob/29c816be6c0c4a48934c57e4a38732b4f680120f/hbase-shell/src/main/ruby/shell/commands/set_compaction_server_throughput_upper_bound.rb#L39
--
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]