-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-25115 HFilePrettyPrinter can't seek to the row which is the first row of a hfile #2473
Conversation
🎊 +1 overall
This message was automatically generated. |
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.
Please add a UT validating the condition you are fixing.
shouldScanKeysValues = true; | ||
} | ||
} | ||
if (needSeekToBegin) { |
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.
Isn't this scanner.seekTo(PrivateCellUtil.createFirstOnRow(this.row))
always going to return -1, since it's fabricating a KV with no CF? If so, I guess your logic could be simplified.
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.
Yes, but only when the row is the first row in hfile, scanner.seekTo(PrivateCellUtil.createFirstOnRow(this.row))
return -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.
Gotcha, thanks for clarifying!
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…st row of a hfile
6870f67
to
e8b8e53
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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. Latest UT failure is not related.
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.
+1
…st row of a hfile Closes #2473 Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…st row of a hfile Closes #2473 Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…st row of a hfile Closes apache#2473 Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…st row of a hfile (apache#2481) Closes apache#2473 Signed-off-by: stack <stack@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> (cherry picked from commit 7de2bb2) Change-Id: Iabb5b40f38f45ba5616f8b883f69cd793ed951f4
If we seek to first row in hfile, the
firstOnRow
with empty famliy( create byPrivateCellUtil.createFirstOnRow
) is smaller than any row in hfile, So we need to seekTo the hfile beginning and do the seek