hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject [1/2] hbase-8763: Combine MVCC and SeqId
Date Sat, 07 Jun 2014 01:19:54 GMT
Repository: hbase
Updated Branches:
  refs/heads/master d6cc2fb1e -> c682d57e9


http://git-wip-us.apache.org/repos/asf/hbase/blob/c682d57e/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConsistencyControl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConsistencyControl.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConsistencyControl.java
index 40fafd9..472e48c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConsistencyControl.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConsistencyControl.java
@@ -46,8 +46,10 @@ public class TestMultiVersionConsistencyControl extends TestCase {
     public boolean failed = false;
 
     public void run() {
+      AtomicLong startPoint = new AtomicLong();
       while (!finished.get()) {
-        MultiVersionConsistencyControl.WriteEntry e = mvcc.beginMemstoreInsert();
+        MultiVersionConsistencyControl.WriteEntry e = 
+            mvcc.beginMemstoreInsertWithSeqNum(startPoint.incrementAndGet());
         // System.out.println("Begin write: " + e.getWriteNumber());
         // 10 usec - 500usec (including 0)
         int sleepTime = rnd.nextInt(500);

http://git-wip-us.apache.org/repos/asf/hbase/blob/c682d57e/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
index fd2bf35..018f190 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
@@ -208,7 +208,7 @@ public class TestStore {
         long size = store.memstore.getFlushableSize();
         Assert.assertEquals(0, size);
         LOG.info("Adding some data");
-        long kvSize = store.add(new KeyValue(row, family, qf1, 1, (byte[])null));
+        long kvSize = store.add(new KeyValue(row, family, qf1, 1, (byte[])null)).getFirst();
         size = store.memstore.getFlushableSize();
         Assert.assertEquals(kvSize, size);
         // Flush.  Bug #1 from HBASE-10466.  Make sure size calculation on failed flush is
right.
@@ -604,19 +604,19 @@ public class TestStore {
 
     size += this.store.add(new KeyValue(Bytes.toBytes("200909091000"), family, qf1,
         System.currentTimeMillis(),
-        Bytes.toBytes(newValue)));
+        Bytes.toBytes(newValue))).getFirst();
     size += this.store.add(new KeyValue(Bytes.toBytes("200909091200"), family, qf1,
         System.currentTimeMillis(),
-        Bytes.toBytes(newValue)));
+        Bytes.toBytes(newValue))).getFirst();
     size += this.store.add(new KeyValue(Bytes.toBytes("200909091300"), family, qf1,
         System.currentTimeMillis(),
-        Bytes.toBytes(newValue)));
+        Bytes.toBytes(newValue))).getFirst();
     size += this.store.add(new KeyValue(Bytes.toBytes("200909091400"), family, qf1,
         System.currentTimeMillis(),
-        Bytes.toBytes(newValue)));
+        Bytes.toBytes(newValue))).getFirst();
     size += this.store.add(new KeyValue(Bytes.toBytes("200909091500"), family, qf1,
         System.currentTimeMillis(),
-        Bytes.toBytes(newValue)));
+        Bytes.toBytes(newValue))).getFirst();
 
 
     for ( int i = 0 ; i < 10000 ; ++i) {


Mime
View raw message