[ https://issues.apache.org/jira/browse/HDFS-17565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883450#comment-17883450 ]
ASF GitHub Bot commented on HDFS-17565: --------------------------------------- ayushtkn commented on code in PR #6928: URL: https://github.com/apache/hadoop/pull/6928#discussion_r1769491905 ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/ErasureCodingWorker.java: ########## @@ -172,4 +175,19 @@ public void shutDown() { public float getXmitWeight() { return xmitWeight; } + + public void setStripedReconstructionPoolSize(int size) { + Preconditions.checkArgument(size > 0, + DFS_DN_EC_RECONSTRUCTION_THREADS_KEY + " should be greater than 0"); + this.stripedReconstructionPool.setCorePoolSize(size); + this.stripedReconstructionPool.setMaximumPoolSize(size); + } + + @VisibleForTesting + public int getStripedReconstructionPoolSize() { + int poolSize = this.stripedReconstructionPool.getCorePoolSize(); + Preconditions.checkArgument(poolSize == this.stripedReconstructionPool.getMaximumPoolSize(), + "The maximum pool size should be equal to core pool size"); Review Comment: I think this isn't required, this looks like validating the ``ThreadPoolExecutor``, that ain't a hadoop thing & isn't required here in the scope either > EC: dfs.datanode.ec.reconstruction.threads should support dynamic > reconfigured. > ------------------------------------------------------------------------------- > > Key: HDFS-17565 > URL: https://issues.apache.org/jira/browse/HDFS-17565 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Chenyu Zheng > Assignee: Chenyu Zheng > Priority: Major > Labels: pull-request-available > > dfs.datanode.ec.reconstruction.threads should support dynamic reconfigured, > then we can adjust the speed of ec block copy. Especially HDFS-17550 wanna > decommissioning DataNode by EC block reconstruction. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org