aajisaka commented on a change in pull request #253:
URL: https://github.com/apache/hadoop/pull/253#discussion_r463414383



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
##########
@@ -892,7 +892,11 @@ private ExtendedBlock 
getBlockToCopy(FsVolumeSpi.BlockIterator iter,
       while (!iter.atEnd() && item.getErrorCount() < getMaxError(item)) {
         try {
           ExtendedBlock block = iter.nextBlock();
-
+          
+          //null pointer should not be passed to FsDatasetSpi.isValidBlock()
+          if(block == null){
+            return block;
+          }

Review comment:
       Resolved by HDFS-12847.




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

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