diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java index 30d2bb0495d..949a2176fce 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java @@ -997,6 +997,12 @@ public class HFileReaderV2 extends AbstractHFileReader { this.meta); seeker = dataBlockEncoder.createSeeker(reader.getComparator(), decodingCtx); } + + @Override + public boolean isSeeked(){ + return this.block != null; + } + /** * Updates the current block to be the given {@link HFileBlock}. Seeks to * the the first key/value pair. @@ -1015,6 +1021,9 @@ public class HFileReaderV2 extends AbstractHFileReader { updateDataBlockEncoder(block); seeker.setCurrentBuffer(getEncodedBuffer(newBlock)); blockFetches++; + + // Reset the next indexed key + this.nextIndexedKey = null; } private void updateDataBlockEncoder(HFileBlock curBlock) {