You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/11/08 08:28:19 UTC
svn commit: r1539934 -
/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
Author: larsh
Date: Fri Nov 8 07:28:18 2013
New Revision: 1539934
URL: http://svn.apache.org/r1539934
Log:
HBASE-9915 Performance: isSeeked() in EncodedScannerV2 always returns false
Modified:
hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java?rev=1539934&r1=1539933&r2=1539934&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java Fri Nov 8 07:28:18 2013
@@ -597,6 +597,12 @@ public class HFileReaderV2 extends Abstr
return curBlock;
}
+
+ @Override
+ public boolean isSeeked(){
+ return this.block != null;
+ }
+
/**
* Compare the given key against the current key
* @param comparator
@@ -992,6 +998,9 @@ public class HFileReaderV2 extends Abstr
seeker.setCurrentBuffer(getEncodedBuffer(newBlock));
blockFetches++;
+
+ // Reset the next indexed key
+ this.nextIndexedKey = null;
}
private ByteBuffer getEncodedBuffer(HFileBlock newBlock) {