hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1539936 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
Date Fri, 08 Nov 2013 07:29:07 GMT
Author: larsh
Date: Fri Nov  8 07:29:07 2013
New Revision: 1539936

URL: http://svn.apache.org/r1539936
Log:
HBASE-9915 Performance: isSeeked() in EncodedScannerV2 always returns false

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java?rev=1539936&r1=1539935&r2=1539936&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
Fri Nov  8 07:29:07 2013
@@ -972,6 +972,11 @@ public class HFileReaderV2 extends Abstr
           includesMemstoreTS);
     }
 
+    @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.
@@ -998,6 +1003,9 @@ public class HFileReaderV2 extends Abstr
 
       seeker.setCurrentBuffer(getEncodedBuffer(newBlock));
       blockFetches++;
+
+      // Reset the next indexed key
+      this.nextIndexedKey = null;
     }
 
     private ByteBuffer getEncodedBuffer(HFileBlock newBlock) {



Mime
View raw message