hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gcha...@apache.org
Subject svn commit: r1394335 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
Date Fri, 05 Oct 2012 00:03:45 GMT
Author: gchanan
Date: Fri Oct  5 00:03:45 2012
New Revision: 1394335

URL: http://svn.apache.org/viewvc?rev=1394335&view=rev
Log:
HBASE-6950 TestAcidGuarantees system test now flushes too aggressively

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java?rev=1394335&r1=1394334&r2=1394335&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
Fri Oct  5 00:03:45 2012
@@ -235,12 +235,20 @@ public class TestAcidGuarantees implemen
     }
   }
 
-
   public void runTestAtomicity(long millisToRun,
       int numWriters,
       int numGetters,
       int numScanners,
       int numUniqueRows) throws Exception {
+    runTestAtomicity(millisToRun, numWriters, numGetters, numScanners, numUniqueRows, false);
+  }
+
+  public void runTestAtomicity(long millisToRun,
+      int numWriters,
+      int numGetters,
+      int numScanners,
+      int numUniqueRows,
+      final boolean systemTest) throws Exception {
     createTableIfMissing();
     TestContext ctx = new TestContext(util.getConfiguration());
     
@@ -261,6 +269,15 @@ public class TestAcidGuarantees implemen
       HBaseAdmin admin = new HBaseAdmin(util.getConfiguration());
       public void doAnAction() throws Exception {
         admin.flush(TABLE_NAME);
+        // Flushing has been a source of ACID violations previously (see HBASE-2856), so
ideally,
+        // we would flush as often as possible.  On a running cluster, this isn't practical:
+        // (1) we will cause a lot of load due to all the flushing and compacting
+        // (2) we cannot change the flushing/compacting related Configuration options to
try to
+        // alleviate this
+        // (3) it is an unrealistic workload, since no one would actually flush that often.
+        // Therefore, let's flush every minute to have more flushes than usual, but not overload
+        // the running cluster.
+        if (systemTest) Thread.sleep(60000);
       }
     });
 
@@ -350,7 +367,7 @@ public class TestAcidGuarantees implemen
     int numGetters = c.getInt("numGetters", 2);
     int numScanners = c.getInt("numScanners", 2);
     int numUniqueRows = c.getInt("numUniqueRows", 3);
-    runTestAtomicity(millis, numWriters, numGetters, numScanners, numUniqueRows);
+    runTestAtomicity(millis, numWriters, numGetters, numScanners, numUniqueRows, true);
     return 0;
   }
 



Mime
View raw message