[
https://issues.apache.org/jira/browse/HDFS-16811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626154#comment-17626154
]
ASF GitHub Bot commented on HDFS-16811:
---------------------------------------
tomscut commented on code in PR #5068:
URL: https://github.com/apache/hadoop/pull/5068#discussion_r1008775655
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminManager.java:
##########
@@ -419,4 +419,28 @@ void runMonitorForTest() throws ExecutionException,
InterruptedException {
executor.submit(monitor).get();
}
+ public void refreshPendingRepLimit(int pendingRepLimit, String key) {
+ ensurePositiveInt(pendingRepLimit, key);
+ this.monitor.setPendingRepLimit(pendingRepLimit);
+ }
+
+ public int getPendingRepLimit() {
Review Comment:
Please add `@VisibleForTesting`.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminManager.java:
##########
@@ -419,4 +419,28 @@ void runMonitorForTest() throws ExecutionException,
InterruptedException {
executor.submit(monitor).get();
}
+ public void refreshPendingRepLimit(int pendingRepLimit, String key) {
+ ensurePositiveInt(pendingRepLimit, key);
+ this.monitor.setPendingRepLimit(pendingRepLimit);
+ }
+
+ public int getPendingRepLimit() {
+ return this.monitor.getPendingRepLimit();
+ }
+
+ public void refreshBlocksPerLock(int blocksPerLock, String key) {
+ ensurePositiveInt(blocksPerLock, key);
+ this.monitor.setBlocksPerLock(blocksPerLock);
+ }
+
+ public int getBlocksPerLock() {
Review Comment:
Add `@VisibleForTesting`.
> Support to make dfs.namenode.decommission.backoff.monitor.pending.limit
> reconfigurable
> ---------------------------------------------------------------------------------------
>
> Key: HDFS-16811
> URL: https://issues.apache.org/jira/browse/HDFS-16811
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Haiyang Hu
> Assignee: Haiyang Hu
> Priority: Major
> Labels: pull-request-available
>
> When the Backoff monitor is enabled, the parameter
> dfs.namenode.decommission.backoff.monitor.pending.limit can be dynamically
> adjusted to determines the maximum number of blocks related to decommission
> and maintenance operations that can be loaded into the replication queue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]