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