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
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to