HBASE-6950 TestAcidGuarantees system test now flushes too aggressively
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1394335 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e898f6de21
commit
6f1af4dba4
@ -235,12 +235,20 @@ public class TestAcidGuarantees implements Tool {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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 implements Tool {
|
||||
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 implements Tool {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user