HBASE-8520 TestIOFencing fails intermittently due to compaction kicking in too soon (Ted Yu)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1481226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e17a4ef2af
commit
639bf9cfa9
|
@ -240,16 +240,16 @@ public class TestIOFencing {
|
|||
TEST_UTIL.createTable(TABLE_NAME, FAMILY);
|
||||
HTable table = new HTable(c, TABLE_NAME);
|
||||
LOG.info("Loading test table");
|
||||
// Load some rows
|
||||
TEST_UTIL.loadNumericRows(table, FAMILY, 0, FIRST_BATCH_COUNT);
|
||||
// Find the region
|
||||
List<HRegion> testRegions = TEST_UTIL.getMiniHBaseCluster().findRegionsForTable(TABLE_NAME);
|
||||
assertEquals(1, testRegions.size());
|
||||
compactingRegion = (CompactionBlockerRegion)testRegions.get(0);
|
||||
assertTrue(compactingRegion.countStoreFiles() > 1);
|
||||
final byte REGION_NAME[] = compactingRegion.getRegionName();
|
||||
LOG.info("Blocking compactions");
|
||||
compactingRegion.stopCompactions();
|
||||
// Load some rows
|
||||
TEST_UTIL.loadNumericRows(table, FAMILY, 0, FIRST_BATCH_COUNT);
|
||||
assertTrue(compactingRegion.countStoreFiles() > 1);
|
||||
final byte REGION_NAME[] = compactingRegion.getRegionName();
|
||||
LOG.info("Asking for compaction");
|
||||
admin.majorCompact(TABLE_NAME);
|
||||
LOG.info("Waiting for compaction to be about to start");
|
||||
|
@ -300,4 +300,4 @@ public class TestIOFencing {
|
|||
TEST_UTIL.shutdownMiniCluster();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue