wchevreuil commented on a change in pull request #2473:
URL: https://github.com/apache/hbase/pull/2473#discussion_r497387643
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java
##########
@@ -323,15 +323,20 @@ public int processFile(Path file, boolean checkRootDir)
throws IOException {
HFileScanner scanner = reader.getScanner(false, false, false);
fileStats = new KeyValueStatsCollector();
boolean shouldScanKeysValues = false;
+ boolean needSeekToBegin = true;
if (this.isSeekToRow) {
// seek to the first kv on this row
- shouldScanKeysValues =
- (scanner.seekTo(PrivateCellUtil.createFirstOnRow(this.row)) != -1);
- } else {
+ if (scanner.seekTo(PrivateCellUtil.createFirstOnRow(this.row)) != -1) {
+ needSeekToBegin = false;
+ shouldScanKeysValues = true;
+ }
+ }
+ if (needSeekToBegin) {
Review comment:
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.
----------------------------------------------------------------
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]