HBASE-6622 TestUpgradeFromHFileV1ToEncoding#testUpgrade fails in trunk
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1377508 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
638529d93b
commit
d992c7742e
|
@ -58,9 +58,11 @@ public class TestMultiVersions {
|
||||||
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
||||||
private HBaseAdmin admin;
|
private HBaseAdmin admin;
|
||||||
|
|
||||||
|
private static final int NUM_SLAVES = 3;
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
UTIL.startMiniCluster();
|
UTIL.startMiniCluster(NUM_SLAVES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
|
@ -140,7 +142,7 @@ public class TestMultiVersions {
|
||||||
table.close();
|
table.close();
|
||||||
UTIL.shutdownMiniHBaseCluster();
|
UTIL.shutdownMiniHBaseCluster();
|
||||||
LOG.debug("HBase cluster shut down -- restarting");
|
LOG.debug("HBase cluster shut down -- restarting");
|
||||||
UTIL.startMiniHBaseCluster(1, 1);
|
UTIL.startMiniHBaseCluster(1, NUM_SLAVES);
|
||||||
// Make a new connection. Use new Configuration instance because old one
|
// Make a new connection. Use new Configuration instance because old one
|
||||||
// is tied to an HConnection that has since gone stale.
|
// is tied to an HConnection that has since gone stale.
|
||||||
table = new HTable(new Configuration(UTIL.getConfiguration()), tableName);
|
table = new HTable(new Configuration(UTIL.getConfiguration()), tableName);
|
||||||
|
|
|
@ -52,12 +52,14 @@ public class TestUpgradeFromHFileV1ToEncoding {
|
||||||
private static final int NUM_HFILE_V1_BATCHES = 10;
|
private static final int NUM_HFILE_V1_BATCHES = 10;
|
||||||
private static final int NUM_HFILE_V2_BATCHES = 20;
|
private static final int NUM_HFILE_V2_BATCHES = 20;
|
||||||
|
|
||||||
|
private static final int NUM_SLAVES = 3;
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
// Use a small flush size to create more HFiles.
|
// Use a small flush size to create more HFiles.
|
||||||
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
|
conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
|
||||||
conf.setInt(HFile.FORMAT_VERSION_KEY, 1); // Use HFile v1 initially
|
conf.setInt(HFile.FORMAT_VERSION_KEY, 1); // Use HFile v1 initially
|
||||||
TEST_UTIL.startMiniCluster();
|
TEST_UTIL.startMiniCluster(NUM_SLAVES);
|
||||||
LOG.debug("Started an HFile v1 cluster");
|
LOG.debug("Started an HFile v1 cluster");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +83,7 @@ public class TestUpgradeFromHFileV1ToEncoding {
|
||||||
TEST_UTIL.shutdownMiniHBaseCluster();
|
TEST_UTIL.shutdownMiniHBaseCluster();
|
||||||
|
|
||||||
conf.setInt(HFile.FORMAT_VERSION_KEY, 2);
|
conf.setInt(HFile.FORMAT_VERSION_KEY, 2);
|
||||||
TEST_UTIL.startMiniHBaseCluster(1, 1);
|
TEST_UTIL.startMiniHBaseCluster(1, NUM_SLAVES);
|
||||||
LOG.debug("Started an HFile v2 cluster");
|
LOG.debug("Started an HFile v2 cluster");
|
||||||
admin = new HBaseAdmin(conf);
|
admin = new HBaseAdmin(conf);
|
||||||
htd = admin.getTableDescriptor(TABLE_BYTES);
|
htd = admin.getTableDescriptor(TABLE_BYTES);
|
||||||
|
|
Loading…
Reference in New Issue