You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/03/09 15:53:00 UTC

[jira] [Commented] (HDFS-17872) DiskBalancer: Plan command support with tolerancePercentage.

    [ https://issues.apache.org/jira/browse/HDFS-17872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064165#comment-18064165 ] 

ASF GitHub Bot commented on HDFS-17872:
---------------------------------------

deepujain opened a new pull request, #8335:
URL: https://github.com/apache/hadoop/pull/8335

   ### Summary
   
   `dfs.disk.balancer.block.tolerance.percent` is documented and used on the DataNode when executing a plan, but the plan command did not set tolerance percentage on plan steps. So the value sent to the DataNode was effectively the step default (0) unless the DataNode fell back to its own config. This change reads the config in the plan command and sets `tolerancePercent` on each step so the plan propagated to the DataNode uses the same value.
   
   ### Change
   
   - **PlanCommand.java**: In `setPlanParams()`, read `dfs.disk.balancer.block.tolerance.percent` from configuration (default 10) and call `step.setTolerancePercent(tolerancePercent)` for each step in each plan. So generated plans include tolerance and the DataNode receives it (it already uses `step.getTolerancePercent()` when building work items).
   - **TestNodePlan.java**: Add `testPlanStepTolerancePercentInJson()`: build a NodePlan with a MoveStep that has `setTolerancePercent(15)`, serialize to JSON, parse back, and assert the step’s `getTolerancePercent()` is 15 (HDFS-17872).
   
   ### JIRA
   
   Fixes HDFS-17872
   




> DiskBalancer: Plan command support with tolerancePercentage.
> ------------------------------------------------------------
>
>                 Key: HDFS-17872
>                 URL: https://issues.apache.org/jira/browse/HDFS-17872
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: fuchaohong
>            Priority: Major
>
> dfs.disk.balancer.block.tolerance.percent
> {code:java}
> The tolerance percent specifies when we have reached a good enough value for any copy step. For example, if you specify 10% then getting close to 10% of the target value is good enough.{code}
> Currently, only *{{maxDiskErrors}}* and *{{bandwidth}}* are passed in the plan, and it is expected that *{{tolerancePercentage}}* can also be propagated to the DataNode.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org