hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/5] git commit: HBASE-12199 Make TestAtomicOperation and TestEncodedSeekers faster
Date Wed, 08 Oct 2014 19:10:33 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 638abb0e2 -> 890916a23
  refs/heads/branch-1 283ec5764 -> ad2064d8a
  refs/heads/master e952e7362 -> e31286bf6


HBASE-12199 Make TestAtomicOperation and TestEncodedSeekers faster

Signed-off-by: Elliott Clark <eclark@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/be64e489
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/be64e489
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/be64e489

Branch: refs/heads/0.98
Commit: be64e4892f1b59da96be2c556200bf974d797b60
Parents: 638abb0
Author: manukranthk <manukranthk@fb.com>
Authored: Tue Oct 7 17:07:19 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Oct 8 11:57:47 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/io/encoding/TestEncodedSeekers.java     |  2 ++
 .../hadoop/hbase/regionserver/TestAtomicOperation.java   | 11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/be64e489/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
index bc87acd..c17565e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.MediumTests;
 import org.apache.hadoop.hbase.Tag;
+import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
@@ -142,6 +143,7 @@ public class TestEncodedSeekers {
       byte[] key = LoadTestKVGenerator.md5PrefixedKey(i).getBytes();
       for (int j = 0; j < NUM_COLS_PER_ROW; ++j) {
         Put put = new Put(key);
+        put.setDurability(Durability.ASYNC_WAL);
         byte[] col = Bytes.toBytes(String.valueOf(j));
         byte[] value = dataGenerator.generateRandomSizeValue(key, col);
         if (includeTags) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/be64e489/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
index b22228c..257579a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
@@ -70,7 +70,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
-
 /**
  * Testing of HRegion.incrementColumnValue, HRegion.increment,
  * and HRegion.append
@@ -237,6 +236,7 @@ public class TestAtomicOperation {
           inc.addColumn(fam1, qual1, amount);
           inc.addColumn(fam1, qual2, amount*2);
           inc.addColumn(fam2, qual3, amount*3);
+          inc.setDurability(Durability.ASYNC_WAL);
           region.increment(inc);
 
           // verify: Make sure we only see completed increments
@@ -274,6 +274,7 @@ public class TestAtomicOperation {
               a.add(fam1, qual1, val);
               a.add(fam1, qual2, val);
               a.add(fam2, qual3, val);
+              a.setDurability(Durability.ASYNC_WAL);
               region.append(a);
 
               Get g = new Get(row);
@@ -349,16 +350,20 @@ public class TestAtomicOperation {
               if (op) {
                 Put p = new Put(row, ts);
                 p.add(fam1, qual1, value1);
+                p.setDurability(Durability.ASYNC_WAL);
                 rm.add(p);
                 Delete d = new Delete(row);
                 d.deleteColumns(fam1, qual2, ts);
+                d.setDurability(Durability.ASYNC_WAL);
                 rm.add(d);
               } else {
                 Delete d = new Delete(row);
                 d.deleteColumns(fam1, qual1, ts);
+                d.setDurability(Durability.ASYNC_WAL);
                 rm.add(d);
                 Put p = new Put(row, ts);
                 p.add(fam1, qual2, value2);
+                p.setDurability(Durability.ASYNC_WAL);
                 rm.add(p);
               }
               region.mutateRow(rm);
@@ -438,15 +443,19 @@ public class TestAtomicOperation {
               if (op) {
                 Put p = new Put(row2, ts);
                 p.add(fam1, qual1, value1);
+                p.setDurability(Durability.ASYNC_WAL);
                 mrm.add(p);
                 Delete d = new Delete(row);
                 d.deleteColumns(fam1, qual1, ts);
+                d.setDurability(Durability.ASYNC_WAL);
                 mrm.add(d);
               } else {
                 Delete d = new Delete(row2);
                 d.deleteColumns(fam1, qual1, ts);
+                d.setDurability(Durability.ASYNC_WAL);
                 mrm.add(d);
                 Put p = new Put(row, ts);
+                p.setDurability(Durability.ASYNC_WAL);
                 p.add(fam1, qual1, value2);
                 mrm.add(p);
               }


Mime
View raw message