[ https://issues.apache.org/jira/browse/HDFS-16423?focusedWorklogId=710506&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-710506 ]
ASF GitHub Bot logged work on HDFS-16423: ----------------------------------------- Author: ASF GitHub Bot Created on: 18/Jan/22 13:40 Start Date: 18/Jan/22 13:40 Worklog Time Spent: 10m Work Description: tomscut commented on a change in pull request #3883: URL: https://github.com/apache/hadoop/pull/3883#discussion_r786768096 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java ########## @@ -1680,8 +1687,8 @@ public BlocksWithLocations getBlocksWithLocations(final DatanodeID datanode, } } if(totalSize<size) { - iter = node.getBlockIterator(); // start from the beginning - for(int i=0; i<startBlock&&totalSize<size; i++) { + iter = node.getBlockIterator(0, storageInfos); // start from the beginning + for(int i=0; i<startBlock&&totalSize<size&&iter.hasNext(); i++) { Review comment: Please add blank spaces to correct the code format. Thanks. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 710506) Time Spent: 2h 20m (was: 2h 10m) > balancer should not get blocks on stale storages > ------------------------------------------------ > > Key: HDFS-16423 > URL: https://issues.apache.org/jira/browse/HDFS-16423 > Project: Hadoop HDFS > Issue Type: Improvement > Components: balancer & mover > Reporter: qinyuren > Assignee: qinyuren > Priority: Major > Labels: pull-request-available > Attachments: image-2022-01-13-17-18-32-409.png > > Time Spent: 2h 20m > Remaining Estimate: 0h > > We have met a problems as described in HDFS-16420 > We found that balancer copied a block multi times without deleting the source > block if this block was placed in a stale storage. And resulting a block with > many copies, but these redundant copies are not deleted until the storage > become not stale. > > !image-2022-01-13-17-18-32-409.png|width=657,height=275! -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org