You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2013/08/02 06:28:47 UTC
svn commit: r1509533 -
/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
Author: enis
Date: Fri Aug 2 04:28:47 2013
New Revision: 1509533
URL: http://svn.apache.org/r1509533
Log:
HBASE-9107 [0.94] Backport HBASE-6950 TestAcidGuarantees system test now flushes too aggressively to 0.94
Modified:
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java?rev=1509533&r1=1509532&r2=1509533&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestAcidGuarantees.java Fri Aug 2 04:28:47 2013
@@ -240,12 +240,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());
@@ -266,6 +274,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);
}
});
@@ -355,7 +372,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;
}