HBASE-9915 Performance: isSeeked() in EncodedScannerV2 always returns false

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1539933 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2013-11-08 07:28:04 +00:00
parent 138b0a972c
commit 20c2734f12
1 changed files with 9 additions and 0 deletions

View File

@ -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) {