You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/12/04 05:53:11 UTC

[GitHub] [hadoop] ayushtkn commented on a change in pull request #3747: HDFS-16370. Fix assert message for BlockInfo

ayushtkn commented on a change in pull request #3747:
URL: https://github.com/apache/hadoop/pull/3747#discussion_r762390295



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfo.java
##########
@@ -146,7 +146,7 @@ BlockInfo getNext(int index) {
     BlockInfo info = (BlockInfo)triplets[index*3+2];
     assert info == null || info.getClass().getName().startsWith(
         BlockInfo.class.getName()) :
-        "BlockInfo is expected at " + index*3;
+        "BlockInfo is expected at " + (index*3+2);

Review comment:
       Same as above, Can you pad some space between the values

##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfo.java
##########
@@ -136,7 +136,7 @@ BlockInfo getPrevious(int index) {
     BlockInfo info = (BlockInfo)triplets[index*3+1];
     assert info == null ||
         info.getClass().getName().startsWith(BlockInfo.class.getName()) :
-        "BlockInfo is expected at " + index*3;
+        "BlockInfo is expected at " + (index*3+1);

Review comment:
       nit: Better to have some space around the values
   ```suggestion
           "BlockInfo is expected at " + (index * 3 + 1);
   ```
   




-- 
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-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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