hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1532442 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
Date Tue, 15 Oct 2013 17:12:13 GMT
Author: tedyu
Date: Tue Oct 15 17:12:12 2013
New Revision: 1532442

URL: http://svn.apache.org/r1532442
Log:
HBASE-9753 Excessive readpoint checks in MemstoreScanner


Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java?rev=1532442&r1=1532441&r2=1532442&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java Tue
Oct 15 17:12:12 2013
@@ -668,7 +668,7 @@ public class MemStore implements HeapSiz
     this.lock.readLock().lock();
     try {
       return Collections.<KeyValueScanner>singletonList(
-          new MemStoreScanner());
+          new MemStoreScanner(MultiVersionConsistencyControl.getThreadReadPoint()));
     } finally {
       this.lock.readLock().unlock();
     }
@@ -716,6 +716,7 @@ public class MemStore implements HeapSiz
 
     // the pre-calculated KeyValue to be returned by peek() or next()
     private KeyValue theNext;
+		private long readPoint;
 
     /*
     Some notes...
@@ -738,16 +739,15 @@ public class MemStore implements HeapSiz
       the adds to kvset in the MemStoreScanner.
     */
 
-    MemStoreScanner() {
+    MemStoreScanner(long readPoint) {
       super();
 
+      this.readPoint = readPoint;
       kvsetAtCreation = kvset;
       snapshotAtCreation = snapshot;
     }
 
     private KeyValue getNext(Iterator<KeyValue> it) {
-      long readPoint = MultiVersionConsistencyControl.getThreadReadPoint();
-
       KeyValue v = null;
       try {
         while (it.hasNext()) {



Mime
View raw message