-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16370. Fix assert message for BlockInfo #3747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
💔 -1 overall
This message was automatically generated. |
| assert info == null || | ||
| info.getClass().getName().startsWith(BlockInfo.class.getName()) : | ||
| "BlockInfo is expected at " + index*3; | ||
| "BlockInfo is expected at " + (index*3+1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Better to have some space around the values
| "BlockInfo is expected at " + (index*3+1); | |
| "BlockInfo is expected at " + (index * 3 + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ayushtkn for your comments.
| assert info == null || info.getClass().getName().startsWith( | ||
| BlockInfo.class.getName()) : | ||
| "BlockInfo is expected at " + index*3; | ||
| "BlockInfo is expected at " + (index*3+2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, Can you pad some space between the values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I fixed this.
ayushtkn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
💔 -1 overall
This message was automatically generated. |
|
Merged, Thanx @tomscut for the contribution!!! |
|
Thanks @ayushtkn for the review and the merge. |
…ed by tomscut. Signed-off-by: Ayush Saxena <[email protected]>
JIRA: HDFS-16370.
In both methods BlockInfo#getPrevious and BlockInfo#getNext, the assert message is wrong. This may cause some misunderstanding and needs to be fixed.