memStoreTSTagsAndOffheapCombination() {
* Once {@link #startMiniDFSCluster} is called, either directly or via
* {@link #startMiniCluster()}, tmp data will be written to the DFS directory instead.
*
- * Previously, there was a distinction between the type of utility returned by
- * {@link #createLocalHTU()} and this constructor; this is no longer the case. All
- * HBaseTestingUtility objects will behave as local until a DFS cluster is started,
+ *
All HBaseTestingUtility objects will behave as local until a DFS cluster is started,
* at which point they will switch to using mini DFS for storage.
*/
public HBaseTestingUtility() {
@@ -322,9 +309,7 @@ public HBaseTestingUtility() {
* Once {@link #startMiniDFSCluster} is called, either directly or via
* {@link #startMiniCluster()}, tmp data will be written to the DFS directory instead.
*
- *
Previously, there was a distinction between the type of utility returned by
- * {@link #createLocalHTU()} and this constructor; this is no longer the case. All
- * HBaseTestingUtility objects will behave as local until a DFS cluster is started,
+ *
All HBaseTestingUtility objects will behave as local until a DFS cluster is started,
* at which point they will switch to using mini DFS for storage.
*
* @param conf The configuration to use for further operations
@@ -355,30 +340,6 @@ public HBaseTestingUtility(@Nullable Configuration conf) {
this.conf.getBoolean(LocalHBaseCluster.ASSIGN_RANDOM_PORTS, true));
}
- /**
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use {@link #HBaseTestingUtility()}
- * instead.
- * @return a normal HBaseTestingUtility
- * @see #HBaseTestingUtility()
- * @see HBASE-19841
- */
- @Deprecated
- public static HBaseTestingUtility createLocalHTU() {
- return new HBaseTestingUtility();
- }
-
- /**
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
- * {@link #HBaseTestingUtility(Configuration)} instead.
- * @return a normal HBaseTestingUtility
- * @see #HBaseTestingUtility(Configuration)
- * @see HBASE-19841
- */
- @Deprecated
- public static HBaseTestingUtility createLocalHTU(Configuration c) {
- return new HBaseTestingUtility(c);
- }
-
/**
* Close both the region {@code r} and it's underlying WAL. For use in tests.
*/
@@ -419,9 +380,7 @@ public void setHBaseCluster(HBaseCluster hbaseCluster) {
/**
* Home our data in a dir under {@link #DEFAULT_BASE_TEST_DIRECTORY}.
* Give it a random name so can have many concurrent tests running if
- * we need to. It needs to amend the {@link #TEST_DIRECTORY_KEY}
- * System property, as it's what minidfscluster bases
- * it data dir on. Moding a System property is not the way to do concurrent
+ * we need to. Moding a System property is not the way to do concurrent
* instances -- another instance could grab the temporary
* value unintentionally -- but not anything can do about it at moment;
* single instance only is how the minidfscluster works.
@@ -686,8 +645,6 @@ public MiniDFSCluster startMiniDFSClusterForTestWAL(int namenodePort) throws IOE
/** This is used before starting HDFS and map-reduce mini-clusters */
private void createDirsAndSetProperties() throws IOException {
setupClusterTestDir();
- conf.set(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
- System.setProperty(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
createDirAndSetProperty("cache_data", "test.cache.data");
createDirAndSetProperty("hadoop_tmp", "hadoop.tmp.dir");
hadoopLogDir = createDirAndSetProperty("hadoop_logs", "hadoop.log.dir");
@@ -1077,7 +1034,6 @@ public MiniHBaseCluster startMiniCluster(StartMiniClusterOption option) throws E
miniClusterRunning = true;
setupClusterTestDir();
- System.setProperty(TEST_DIRECTORY_KEY, this.clusterTestDir.getPath());
// Bring up mini dfs cluster. This spews a bunch of warnings about missing
// scheme. Complaints are 'Scheme is undefined for build/test/data/dfs/name1'.
@@ -1927,34 +1883,6 @@ public void deleteTableIfAny(TableName tableName) throws IOException {
public static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
public static final String START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_CHARSET);
- /**
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
- * {@link #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)} instead.
- * @see #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)
- * @see HBASE-13893
- */
- @Deprecated
- public HTableDescriptor createTableDescriptor(final String name,
- final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) {
- return this.createTableDescriptor(TableName.valueOf(name), minVersions, versions, ttl,
- keepDeleted);
- }
-
- /**
- * Create a table of name name.
- * @param name Name to give table.
- * @return Column descriptor.
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
- * {@link #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)} instead.
- * @see #createTableDescriptor(TableName, int, int, int, KeepDeletedCells)
- * @see HBASE-13893
- */
- @Deprecated
- public HTableDescriptor createTableDescriptor(final String name) {
- return createTableDescriptor(TableName.valueOf(name), HColumnDescriptor.DEFAULT_MIN_VERSIONS,
- MAXVERSIONS, HConstants.FOREVER, HColumnDescriptor.DEFAULT_KEEP_DELETED);
- }
-
public HTableDescriptor createTableDescriptor(final TableName name,
final int minVersions, final int versions, final int ttl, KeepDeletedCells keepDeleted) {
HTableDescriptor htd = new HTableDescriptor(name);
@@ -2038,32 +1966,6 @@ public HRegion createLocalHRegion(RegionInfo info, TableDescriptor desc, WAL wal
return HRegion.createHRegion(info, getDataTestDir(), getConfiguration(), desc, wal);
}
- /**
- * @param tableName the name of the table
- * @param startKey the start key of the region
- * @param stopKey the stop key of the region
- * @param callingMethod the name of the calling method probably a test method
- * @param conf the configuration to use
- * @param isReadOnly {@code true} if the table is read only, {@code false} otherwise
- * @param families the column families to use
- * @throws IOException if an IO problem is encountered
- * @return A region on which you must call {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)}
- * when done.
- * @deprecated since 2.0.0 and will be removed in 3.0.0. Use
- * {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)}
- * instead.
- * @see #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)
- * @see HBASE-13893
- */
- @Deprecated
- public HRegion createLocalHRegion(byte[] tableName, byte[] startKey, byte[] stopKey,
- String callingMethod, Configuration conf, boolean isReadOnly, Durability durability,
- WAL wal, byte[]... families) throws IOException {
- return this
- .createLocalHRegion(TableName.valueOf(tableName), startKey, stopKey, isReadOnly, durability,
- wal, families);
- }
-
/**
* @param tableName
* @param startKey
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index 36d31b402a21..5f802583a9d0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -171,7 +171,7 @@ public static void tearDownAfterClass() throws Exception {
*/
@Test
public void testDuplicateAppend() throws Exception {
- HTableDescriptor hdt = TEST_UTIL.createTableDescriptor(name.getMethodName());
+ HTableDescriptor hdt = TEST_UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
Map kvs = new HashMap<>();
kvs.put(SleepAtFirstRpcCall.SLEEP_TIME_CONF_KEY, "2000");
hdt.addCoprocessor(SleepAtFirstRpcCall.class.getName(), null, 1, kvs);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
index acf250c8c2d4..031dd871fcd1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
@@ -278,7 +278,7 @@ public static void afterClass() throws Exception {
@Test
public void testCreateDeleteTable() throws IOException {
// Create table then get the single region for our new table.
- HTableDescriptor hdt = HTU.createTableDescriptor("testCreateDeleteTable");
+ HTableDescriptor hdt = HTU.createTableDescriptor(TableName.valueOf("testCreateDeleteTable"));
hdt.setRegionReplication(NB_SERVERS);
hdt.addCoprocessor(SlowMeCopro.class.getName());
Table table = HTU.createTable(hdt, new byte[][]{f}, null);
@@ -370,7 +370,8 @@ public void testChangeTable() throws Exception {
@SuppressWarnings("deprecation")
@Test
public void testReplicaAndReplication() throws Exception {
- HTableDescriptor hdt = HTU.createTableDescriptor("testReplicaAndReplication");
+ HTableDescriptor hdt =
+ HTU.createTableDescriptor(TableName.valueOf("testReplicaAndReplication"));
hdt.setRegionReplication(NB_SERVERS);
HColumnDescriptor fam = new HColumnDescriptor(row);
@@ -456,7 +457,7 @@ public void testReplicaAndReplication() throws Exception {
public void testBulkLoad() throws IOException {
// Create table then get the single region for our new table.
LOG.debug("Creating test table");
- HTableDescriptor hdt = HTU.createTableDescriptor("testBulkLoad");
+ HTableDescriptor hdt = HTU.createTableDescriptor(TableName.valueOf("testBulkLoad"));
hdt.setRegionReplication(NB_SERVERS);
hdt.addCoprocessor(SlowMeCopro.class.getName());
Table table = HTU.createTable(hdt, new byte[][]{f}, null);
@@ -512,7 +513,7 @@ public void testBulkLoad() throws IOException {
@Test
public void testReplicaGetWithPrimaryDown() throws IOException {
// Create table then get the single region for our new table.
- HTableDescriptor hdt = HTU.createTableDescriptor("testCreateDeleteTable");
+ HTableDescriptor hdt = HTU.createTableDescriptor(TableName.valueOf("testCreateDeleteTable"));
hdt.setRegionReplication(NB_SERVERS);
hdt.addCoprocessor(RegionServerStoppedCopro.class.getName());
try {
@@ -546,7 +547,7 @@ public void testReplicaGetWithPrimaryDown() throws IOException {
@Test
public void testReplicaScanWithPrimaryDown() throws IOException {
// Create table then get the single region for our new table.
- HTableDescriptor hdt = HTU.createTableDescriptor("testCreateDeleteTable");
+ HTableDescriptor hdt = HTU.createTableDescriptor(TableName.valueOf("testCreateDeleteTable"));
hdt.setRegionReplication(NB_SERVERS);
hdt.addCoprocessor(RegionServerStoppedCopro.class.getName());
@@ -592,7 +593,8 @@ public void testReplicaGetWithRpcClientImpl() throws IOException {
HTU.getConfiguration().setBoolean("hbase.ipc.client.specificThreadForWriting", true);
HTU.getConfiguration().set("hbase.rpc.client.impl", "org.apache.hadoop.hbase.ipc.RpcClientImpl");
// Create table then get the single region for our new table.
- HTableDescriptor hdt = HTU.createTableDescriptor("testReplicaGetWithRpcClientImpl");
+ HTableDescriptor hdt =
+ HTU.createTableDescriptor(TableName.valueOf("testReplicaGetWithRpcClientImpl"));
hdt.setRegionReplication(NB_SERVERS);
hdt.addCoprocessor(SlowMeCopro.class.getName());
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
index cacc39a26553..6b6d6543e89d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
@@ -195,7 +195,8 @@ public static void beforeClass() throws Exception {
HTU.startMiniCluster(NB_SERVERS);
// Create table then get the single region for our new table.
- HTableDescriptor hdt = HTU.createTableDescriptor(TestReplicasClient.class.getSimpleName());
+ HTableDescriptor hdt =
+ HTU.createTableDescriptor(TableName.valueOf(TestReplicasClient.class.getSimpleName()));
hdt.addCoprocessor(SlowMeCopro.class.getName());
HTU.createTable(hdt, new byte[][]{f}, null);
TABLE_NAME = hdt.getTableName();
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
index 6b37db6c09a0..8699abfa7e51 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
@@ -82,7 +82,7 @@ public class TestCoprocessorInterface {
@Rule public TestName name = new TestName();
private static final Logger LOG = LoggerFactory.getLogger(TestCoprocessorInterface.class);
- private static final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
static final Path DIR = TEST_UTIL.getDataTestDir();
private static class CustomScanner implements RegionScanner {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreMasterCoprocessor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreMasterCoprocessor.java
index 5afc7b07cfe8..dcf1ad3290a8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreMasterCoprocessor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreMasterCoprocessor.java
@@ -49,7 +49,7 @@ public class TestCoreMasterCoprocessor {
HBaseClassTestRule.forClass(TestCoreMasterCoprocessor.class);
@Rule public TestName name = new TestName();
- private static final HBaseTestingUtility HTU = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility HTU = new HBaseTestingUtility();
private MasterServices ms;
private MasterCoprocessorHost mch;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionCoprocessor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionCoprocessor.java
index ceb6b5c9e1ec..6165e46223ef 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionCoprocessor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionCoprocessor.java
@@ -58,7 +58,7 @@ public class TestCoreRegionCoprocessor {
HBaseClassTestRule.forClass(TestCoreRegionCoprocessor.class);
@Rule public TestName name = new TestName();
- HBaseTestingUtility HTU = HBaseTestingUtility.createLocalHTU();
+ HBaseTestingUtility HTU = new HBaseTestingUtility();
private HRegion region = null;
private RegionServerServices rss;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionServerCoprocessor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionServerCoprocessor.java
index 4e14867c8dfb..b530423297de 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionServerCoprocessor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoreRegionServerCoprocessor.java
@@ -49,7 +49,7 @@ public class TestCoreRegionServerCoprocessor {
HBaseClassTestRule.forClass(TestCoreRegionServerCoprocessor.class);
@Rule public TestName name = new TestName();
- private static final HBaseTestingUtility HTU = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility HTU = new HBaseTestingUtility();
private RegionServerServices rss;
private RegionServerCoprocessorHost rsch;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
index 12f2121872fa..856df096d9b4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
@@ -79,7 +79,7 @@ public class TestEncodedSeekers {
private static final int NUM_HFILES = 4;
private static final int NUM_ROWS_PER_FLUSH = NUM_ROWS / NUM_HFILES;
- private final HBaseTestingUtility testUtil = HBaseTestingUtility.createLocalHTU();
+ private final HBaseTestingUtility testUtil = new HBaseTestingUtility();
private final DataBlockEncoding encoding;
private final boolean includeTags;
private final boolean compressTags;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheOnWrite.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheOnWrite.java
index 3a769b09ba9f..44d02e3cf2b2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheOnWrite.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheOnWrite.java
@@ -89,7 +89,7 @@ public class TestCacheOnWrite {
private static final Logger LOG = LoggerFactory.getLogger(TestCacheOnWrite.class);
- private static final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private Configuration conf;
private CacheConfig cacheConf;
private FileSystem fs;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestForceCacheImportantBlocks.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestForceCacheImportantBlocks.java
index fd39f4817dc6..6023991ae9d4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestForceCacheImportantBlocks.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestForceCacheImportantBlocks.java
@@ -61,7 +61,7 @@ public class TestForceCacheImportantBlocks {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestForceCacheImportantBlocks.class);
- private final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final String TABLE = "myTable";
private static final String CF = "myCF";
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerFromBucketCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerFromBucketCache.java
index ad6a0ab8c76a..75e5575e76fe 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerFromBucketCache.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerFromBucketCache.java
@@ -77,7 +77,7 @@ public class TestScannerFromBucketCache {
private TableName tableName;
private void setUp(boolean useBucketCache) throws IOException {
- test_util = HBaseTestingUtility.createLocalHTU();
+ test_util = new HBaseTestingUtility();
conf = test_util.getConfiguration();
if (useBucketCache) {
conf.setInt("hbase.bucketcache.size", 400);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingKeyRange.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingKeyRange.java
index 09f9d45a7acb..72eb5c06cab3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingKeyRange.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingKeyRange.java
@@ -61,7 +61,7 @@ public class TestScannerSelectionUsingKeyRange {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestScannerSelectionUsingKeyRange.class);
- private static final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static TableName TABLE = TableName.valueOf("myTable");
private static String FAMILY = "myCF";
private static byte[] FAMILY_BYTES = Bytes.toBytes(FAMILY);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
index 2065c0cc1892..2bf9ea312fef 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestScannerSelectionUsingTTL.java
@@ -68,7 +68,7 @@ public class TestScannerSelectionUsingTTL {
private static final Logger LOG =
LoggerFactory.getLogger(TestScannerSelectionUsingTTL.class);
- private static final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static TableName TABLE = TableName.valueOf("myTable");
private static String FAMILY = "myCF";
private static byte[] FAMILY_BYTES = Bytes.toBytes(FAMILY);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
index 197073746423..71cc49ec927d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
@@ -58,7 +58,7 @@ public class TestHMasterRPCException {
private static final Logger LOG = LoggerFactory.getLogger(TestHMasterRPCException.class);
- private final HBaseTestingUtility testUtil = HBaseTestingUtility.createLocalHTU();
+ private final HBaseTestingUtility testUtil = new HBaseTestingUtility();
private HMaster master;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobFileCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobFileCache.java
index b5bbd539e4b2..3796954ea8ca 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobFileCache.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobFileCache.java
@@ -85,10 +85,10 @@ public class TestMobFileCache {
@Before
public void setUp() throws Exception {
- UTIL = HBaseTestingUtility.createLocalHTU();
+ UTIL = new HBaseTestingUtility();
conf = UTIL.getConfiguration();
conf.set(MobConstants.MOB_FILE_CACHE_SIZE_KEY, TEST_CACHE_SIZE);
- HTableDescriptor htd = UTIL.createTableDescriptor("testMobFileCache");
+ HTableDescriptor htd = UTIL.createTableDescriptor(TableName.valueOf("testMobFileCache"));
HColumnDescriptor hcd1 = new HColumnDescriptor(FAMILY1);
hcd1.setMobEnabled(true);
hcd1.setMobThreshold(0);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
index b449f37ed1e1..5e9fa72e8c00 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
@@ -95,7 +95,7 @@ public class TestAtomicOperation {
@Rule public TestName name = new TestName();
HRegion region = null;
- private HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
// Test names
static byte[] tableName;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCacheOnWriteInSchema.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCacheOnWriteInSchema.java
index 5bb103c6e3bc..a921d040aeb3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCacheOnWriteInSchema.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCacheOnWriteInSchema.java
@@ -82,7 +82,7 @@ public class TestCacheOnWriteInSchema {
private static final Logger LOG = LoggerFactory.getLogger(TestCacheOnWriteInSchema.class);
@Rule public TestName name = new TestName();
- private static final HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final String DIR = TEST_UTIL.getDataTestDir("TestCacheOnWriteInSchema").toString();
private static byte [] table;
private static byte [] family = Bytes.toBytes("family");
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
index 9b63500f604a..26e8471a2c3a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
@@ -58,7 +58,7 @@ public class TestColumnSeeking {
HBaseClassTestRule.forClass(TestColumnSeeking.class);
@Rule public TestName name = new TestName();
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final Logger LOG = LoggerFactory.getLogger(TestColumnSeeking.class);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
index e5a2a8af2cb2..80e312b1718a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
@@ -107,7 +107,7 @@ protected void compactingSetUp() throws Exception {
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, true);
conf.setFloat(MemStoreLAB.CHUNK_POOL_MAXSIZE_KEY, 0.2f);
conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, 1000);
- HBaseTestingUtility hbaseUtility = HBaseTestingUtility.createLocalHTU(conf);
+ HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
HColumnDescriptor hcd = new HColumnDescriptor(FAMILY);
HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("foobar"));
htd.addFamily(hcd);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index a1d76fba3f14..aef4e26e12bd 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -51,6 +51,7 @@
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Durability;
import org.apache.hadoop.hbase.client.Put;
@@ -92,7 +93,7 @@ public class TestCompaction {
HBaseClassTestRule.forClass(TestCompaction.class);
@Rule public TestName name = new TestName();
- private static final HBaseTestingUtility UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
protected Configuration conf = UTIL.getConfiguration();
private HRegion r = null;
@@ -126,7 +127,7 @@ public TestCompaction() {
@Before
public void setUp() throws Exception {
- this.htd = UTIL.createTableDescriptor(name.getMethodName());
+ this.htd = UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
if (name.getMethodName().equals("testCompactionSeqId")) {
UTIL.getConfiguration().set("hbase.hstore.compaction.kv.max", "10");
UTIL.getConfiguration().set(
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
index 4263de569550..2684e73ab1ce 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionArchiveConcurrentClose.java
@@ -76,7 +76,7 @@ public class TestCompactionArchiveConcurrentClose {
@Before
public void setup() throws Exception {
- testUtil = HBaseTestingUtility.createLocalHTU();
+ testUtil = new HBaseTestingUtility();
testDir = testUtil.getDataTestDir("TestStoreFileRefresherChore");
FSUtils.setRootDir(testUtil.getConfiguration(), testDir);
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
index 77f796f8c3bc..0ae5fbcd79f0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
@@ -916,7 +916,7 @@ protected void checkShouldFlush(Configuration conf, boolean expected) throws Exc
try {
EnvironmentEdgeForMemstoreTest edge = new EnvironmentEdgeForMemstoreTest();
EnvironmentEdgeManager.injectEdge(edge);
- HBaseTestingUtility hbaseUtility = HBaseTestingUtility.createLocalHTU(conf);
+ HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
String cf = "foo";
HRegion region =
hbaseUtility.createTestRegion("foobar", ColumnFamilyDescriptorBuilder.of(cf));
@@ -942,7 +942,7 @@ public void testShouldFlushMeta() throws Exception {
// the MEMSTORE_PERIODIC_FLUSH_INTERVAL is set to a higher value)
Configuration conf = new Configuration();
conf.setInt(HRegion.MEMSTORE_PERIODIC_FLUSH_INTERVAL, HRegion.SYSTEM_CACHE_FLUSH_INTERVAL * 10);
- HBaseTestingUtility hbaseUtility = HBaseTestingUtility.createLocalHTU(conf);
+ HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
Path testDir = hbaseUtility.getDataTestDir();
EnvironmentEdgeForMemstoreTest edge = new EnvironmentEdgeForMemstoreTest();
EnvironmentEdgeManager.injectEdge(edge);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFailedAppendAndSync.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFailedAppendAndSync.java
index 14906539798c..6c23fd58786f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFailedAppendAndSync.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestFailedAppendAndSync.java
@@ -83,7 +83,7 @@ public class TestFailedAppendAndSync {
@Before
public void setup() throws IOException {
- TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ TEST_UTIL = new HBaseTestingUtility();
CONF = TEST_UTIL.getConfiguration();
// Disable block cache.
CONF.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0f);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
index eb3cc7353827..17512678892b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
@@ -248,7 +248,7 @@ public class TestHRegion {
@Before
public void setup() throws IOException {
- TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ TEST_UTIL = new HBaseTestingUtility();
CONF = TEST_UTIL.getConfiguration();
NettyAsyncFSWALConfigHelper.setEventLoopConfig(CONF, GROUP, NioSocketChannel.class);
dir = TEST_UTIL.getDataTestDir("TestHRegion").toString();
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
index 92ecd861de42..e47960dda691 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
@@ -1121,7 +1121,7 @@ public void testSeqIdsFromReplay() throws IOException {
byte[] tableName = Bytes.toBytes(method);
byte[] family = Bytes.toBytes("family");
- HRegion region = initHRegion(tableName, method, family);
+ HRegion region = initHRegion(tableName, family);
try {
// replay an entry that is bigger than current read point
long readPoint = region.getMVCC().getReadPoint();
@@ -1699,16 +1699,14 @@ private void putDataByReplay(HRegion region,
}
}
- private static HRegion initHRegion(byte[] tableName,
- String callingMethod, byte[]... families) throws IOException {
+ private static HRegion initHRegion(byte[] tableName, byte[]... families) throws IOException {
return initHRegion(tableName, HConstants.EMPTY_START_ROW, HConstants.EMPTY_END_ROW,
- callingMethod, TEST_UTIL.getConfiguration(), false, Durability.SYNC_WAL, null, families);
+ false, Durability.SYNC_WAL, null, families);
}
private static HRegion initHRegion(byte[] tableName, byte[] startKey, byte[] stopKey,
- String callingMethod, Configuration conf, boolean isReadOnly, Durability durability,
- WAL wal, byte[]... families) throws IOException {
- return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey, callingMethod, conf,
+ boolean isReadOnly, Durability durability, WAL wal, byte[]... families) throws IOException {
+ return TEST_UTIL.createLocalHRegion(TableName.valueOf(tableName), startKey, stopKey,
isReadOnly, durability, wal, families);
}
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
index 6683d845a128..1d17b3203052 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
@@ -35,6 +35,7 @@
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeepDeletedCells;
import org.apache.hadoop.hbase.PrivateCellUtil;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
@@ -61,7 +62,7 @@ public class TestKeepDeletes {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestKeepDeletes.class);
- HBaseTestingUtility hbu = HBaseTestingUtility.createLocalHTU();
+ HBaseTestingUtility hbu = new HBaseTestingUtility();
private final byte[] T0 = Bytes.toBytes("0");
private final byte[] T1 = Bytes.toBytes("1");
private final byte[] T2 = Bytes.toBytes("2");
@@ -104,7 +105,7 @@ public void tearDown() throws Exception {
@Test
public void testBasicScenario() throws Exception {
// keep 3 versions, rows do not expire
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -201,7 +202,7 @@ public void testBasicScenario() throws Exception {
@Test
public void testRawScanWithoutKeepingDeletes() throws Exception {
// KEEP_DELETED_CELLS is NOT enabled
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -246,7 +247,7 @@ public void testRawScanWithoutKeepingDeletes() throws Exception {
@Test
public void testWithoutKeepingDeletes() throws Exception {
// KEEP_DELETED_CELLS is NOT enabled
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -299,7 +300,7 @@ public void testWithoutKeepingDeletes() throws Exception {
*/
@Test
public void testRawScanWithColumns() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.TRUE);
Region region = hbu.createLocalHRegion(htd, null, null);
@@ -323,7 +324,7 @@ public void testRawScanWithColumns() throws Exception {
*/
@Test
public void testRawScan() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.TRUE);
Region region = hbu.createLocalHRegion(htd, null, null);
@@ -413,7 +414,7 @@ public void testRawScan() throws Exception {
*/
@Test
public void testDeleteMarkerExpirationEmptyStore() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -456,7 +457,7 @@ public void testDeleteMarkerExpirationEmptyStore() throws Exception {
*/
@Test
public void testDeleteMarkerExpiration() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -519,7 +520,7 @@ public void testDeleteMarkerExpiration() throws Exception {
*/
@Test
public void testWithOldRow() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -597,7 +598,7 @@ public void testWithOldRow() throws Exception {
*/
@Test
public void testRanges() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 3,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 3,
HConstants.FOREVER, KeepDeletedCells.TRUE);
Region region = hbu.createLocalHRegion(htd, null, null);
@@ -679,7 +680,7 @@ public void testRanges() throws Exception {
*/
@Test
public void testDeleteMarkerVersioning() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
@@ -772,7 +773,7 @@ public void testDeleteMarkerVersioning() throws Exception {
*/
@Test
public void testWithMixedCFs() throws Exception {
- HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
Region region = hbu.createLocalHRegion(htd, null, null);
@@ -824,8 +825,8 @@ public void testWithMixedCFs() throws Exception {
*/
@Test
public void testWithMinVersions() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.TRUE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 3,
+ 1000, 1, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
@@ -903,8 +904,8 @@ public void testWithMinVersions() throws Exception {
*/
@Test
public void testWithTTL() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 1, 1000, 1, KeepDeletedCells.TTL);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 1,
+ 1000, 1, KeepDeletedCells.TTL);
HRegion region = hbu.createLocalHRegion(htd, null, null);
long ts = EnvironmentEdgeManager.currentTime() - 2000; // 2s in the past
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
index 4fdd6b337f67..b1f4f3912bda 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
@@ -42,6 +42,7 @@
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeepDeletedCells;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
@@ -88,7 +89,7 @@ public static Object[] data() {
}
@Rule public TestName name;
private static final Logger LOG = LoggerFactory.getLogger(TestMajorCompaction.class.getName());
- private static final HBaseTestingUtility UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
protected Configuration conf = UTIL.getConfiguration();
private HRegion r = null;
@@ -120,7 +121,8 @@ public TestMajorCompaction(String compType) {
@Before
public void setUp() throws Exception {
- this.htd = UTIL.createTableDescriptor(name.getMethodName().replace('[','i').replace(']','i'));
+ this.htd = UTIL.createTableDescriptor(
+ TableName.valueOf(name.getMethodName().replace('[','i').replace(']','i')));
this.r = UTIL.createLocalHRegion(htd, null, null);
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
index bf01ddb5672c..513d9234d2e8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreSegmentsIterator.java
@@ -74,7 +74,7 @@ public class TestMemStoreSegmentsIterator {
@Before
public void setup() throws IOException {
Configuration conf = new Configuration();
- HBaseTestingUtility hbaseUtility = HBaseTestingUtility.createLocalHTU(conf);
+ HBaseTestingUtility hbaseUtility = new HBaseTestingUtility(conf);
HColumnDescriptor hcd = new HColumnDescriptor(FAMILY);
HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(TABLE));
htd.addFamily(hcd);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
index 0a33c58c7632..783f08764531 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
@@ -29,6 +29,7 @@
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeepDeletedCells;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
@@ -54,7 +55,7 @@ public class TestMinVersions {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestMinVersions.class);
- HBaseTestingUtility hbu = HBaseTestingUtility.createLocalHTU();
+ HBaseTestingUtility hbu = new HBaseTestingUtility();
private final byte[] T0 = Bytes.toBytes("0");
private final byte[] T1 = Bytes.toBytes("1");
private final byte[] T2 = Bytes.toBytes("2");
@@ -71,8 +72,8 @@ public class TestMinVersions {
*/
@Test
public void testGetClosestBefore() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 1, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 1,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
try {
@@ -121,8 +122,8 @@ public void testGetClosestBefore() throws Exception {
@Test
public void testStoreMemStore() throws Exception {
// keep 3 versions minimum
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 3,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
// 2s in the past
long ts = EnvironmentEdgeManager.currentTime() - 2000;
@@ -176,8 +177,8 @@ public void testStoreMemStore() throws Exception {
*/
@Test
public void testDelete() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 3, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 3,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
// 2s in the past
@@ -235,8 +236,8 @@ public void testDelete() throws Exception {
*/
@Test
public void testMemStore() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 2, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 2,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
// 2s in the past
@@ -311,8 +312,8 @@ public void testMemStore() throws Exception {
@Test
public void testBaseCase() throws Exception {
// 1 version minimum, 1000 versions maximum, ttl = 1s
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 2, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 2,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
try {
@@ -403,8 +404,8 @@ public void testBaseCase() throws Exception {
*/
@Test
public void testFilters() throws Exception {
- HTableDescriptor htd =
- hbu.createTableDescriptor(name.getMethodName(), 2, 1000, 1, KeepDeletedCells.FALSE);
+ HTableDescriptor htd = hbu.createTableDescriptor(TableName.valueOf(name.getMethodName()), 2,
+ 1000, 1, KeepDeletedCells.FALSE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
final byte [] c1 = COLUMNS[1];
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
index 7b531484a6ff..0185d6cd7c2b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
@@ -29,6 +29,7 @@
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
@@ -59,7 +60,7 @@ public class TestMinorCompaction {
@Rule public TestName name = new TestName();
private static final Logger LOG = LoggerFactory.getLogger(TestMinorCompaction.class.getName());
- private static final HBaseTestingUtility UTIL = HBaseTestingUtility.createLocalHTU();
+ private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
protected Configuration conf = UTIL.getConfiguration();
private HRegion r = null;
@@ -90,7 +91,7 @@ public TestMinorCompaction() {
@Before
public void setUp() throws Exception {
- this.htd = UTIL.createTableDescriptor(name.getMethodName());
+ this.htd = UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
this.r = UTIL.createLocalHRegion(htd, null, null);
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreCompaction.java
index cccc97005398..13d200eeedef 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreCompaction.java
@@ -45,6 +45,7 @@
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
import org.apache.hadoop.hbase.client.Delete;
@@ -109,7 +110,7 @@ private void init(Configuration conf, long mobThreshold) throws Exception {
HBaseTestingUtility UTIL = new HBaseTestingUtility(conf);
compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
- htd = UTIL.createTableDescriptor(name.getMethodName());
+ htd = UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
hcd = new HColumnDescriptor(COLUMN_FAMILY);
hcd.setMobEnabled(true);
hcd.setMobThreshold(mobThreshold);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
index 5950b9435848..7d48fce17e7d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
@@ -104,7 +104,7 @@ public abstract class TestMultiColumnScanner {
/** The probability to delete a row/column pair */
private static final double DELETE_PROBABILITY = 0.02;
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@Parameter(0)
public Compression.Algorithm comprAlgo;
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java
index 5ce32de3a713..eb5251132c9b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java
@@ -65,7 +65,7 @@ public class TestMultiLogThreshold {
@BeforeClass
public static void setup() throws Exception {
final TableName tableName = TableName.valueOf("tableName");
- TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ TEST_UTIL = new HBaseTestingUtility();
CONF = TEST_UTIL.getConfiguration();
THRESHOLD = CONF.getInt(RSRpcServices.BATCH_ROWS_THRESHOLD_NAME,
RSRpcServices.BATCH_ROWS_THRESHOLD_DEFAULT);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionIncrement.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionIncrement.java
index e5006eafb65d..1a4ab8f66008 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionIncrement.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionIncrement.java
@@ -72,7 +72,7 @@ public class TestRegionIncrement {
@Before
public void setUp() throws Exception {
- TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ TEST_UTIL = new HBaseTestingUtility();
}
@After
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
index 5cf19795c24e..8545366d1bf6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java
@@ -93,7 +93,7 @@ public void before() throws Exception {
HTU.startMiniCluster(NB_SERVERS);
htd = HTU.createTableDescriptor(
- name.getMethodName().substring(0, name.getMethodName().length()-3));
+ TableName.valueOf(name.getMethodName().substring(0, name.getMethodName().length() - 3)));
htd.setRegionReplication(3);
HTU.getAdmin().createTable(htd);
}
@@ -327,7 +327,7 @@ public void testLotsOfRegionReplicas() throws IOException {
int numRegions = NB_SERVERS * 20;
int regionReplication = 10;
String tableName = htd.getTableName().getNameAsString() + "2";
- htd = HTU.createTableDescriptor(tableName);
+ htd = HTU.createTableDescriptor(TableName.valueOf(tableName));
htd.setRegionReplication(regionReplication);
// dont care about splits themselves too much
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java
index 5a4cea60b2aa..15c198a90786 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRowTooBig.java
@@ -49,7 +49,7 @@ public class TestRowTooBig {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestRowTooBig.class);
- private final static HBaseTestingUtility HTU = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility HTU = new HBaseTestingUtility();
private static Path rootRegionDir;
private static final HTableDescriptor TEST_HTD =
new HTableDescriptor(TableName.valueOf(TestRowTooBig.class.getSimpleName()));
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
index 3cf7447352f4..ed51e7e87bdc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
@@ -85,7 +85,7 @@ public class TestScanWithBloomError {
private FileSystem fs;
private Configuration conf;
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@Parameters
public static final Collection parameters() {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
index 5d915b4e7b2f..2fa46fa7de64 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
@@ -75,7 +75,7 @@ public class TestScanner {
@Rule public TestName name = new TestName();
private static final Logger LOG = LoggerFactory.getLogger(TestScanner.class);
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final byte [] FIRST_ROW = HConstants.EMPTY_START_ROW;
private static final byte [][] COLS = { HConstants.CATALOG_FAMILY };
@@ -516,7 +516,7 @@ public void testScanAndRealConcurrentFlush() throws Exception {
@Test
@SuppressWarnings("deprecation")
public void testScanAndConcurrentMajorCompact() throws Exception {
- HTableDescriptor htd = TEST_UTIL.createTableDescriptor(name.getMethodName());
+ HTableDescriptor htd = TEST_UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
this.region = TEST_UTIL.createLocalHRegion(htd, null, null);
Table hri = new RegionAsTable(region);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerWithCorruptHFile.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerWithCorruptHFile.java
index a6ec9fc6fbfb..63935a34cbac 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerWithCorruptHFile.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerWithCorruptHFile.java
@@ -59,7 +59,7 @@ public class TestScannerWithCorruptHFile {
@Rule public TestName name = new TestName();
private static final byte[] FAMILY_NAME = Bytes.toBytes("f");
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@BeforeClass
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
index f6db8fa5384a..01d0fa3b23c2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
@@ -126,7 +126,7 @@ public class TestSeekOptimizations {
private long totalSeekDiligent, totalSeekLazy;
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@Parameters
public static final Collection parameters() {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
index 88c3dffcac27..614e0ae2d655 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
@@ -557,7 +557,8 @@ public void testMasterRestartAtRegionSplitPendingCatalogJanitor()
@Test
public void testSplitWithRegionReplicas() throws Exception {
final TableName tableName = TableName.valueOf(name.getMethodName());
- HTableDescriptor htd = TESTING_UTIL.createTableDescriptor(name.getMethodName());
+ HTableDescriptor htd =
+ TESTING_UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
htd.setRegionReplication(2);
htd.addCoprocessor(SlowMeCopro.class.getName());
// Create table then get the single region for our new table.
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTimestampFilterSeekHint.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTimestampFilterSeekHint.java
index e97ed6ba10dc..dd5c360ff98c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTimestampFilterSeekHint.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTimestampFilterSeekHint.java
@@ -44,7 +44,7 @@ public class TestTimestampFilterSeekHint {
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestTimestampFilterSeekHint.class);
- private final static HBaseTestingUtility TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private final static String RK = "myRK";
private final static byte[] RK_BYTES = Bytes.toBytes(RK);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
index b0e0a4e792b3..1d4da55259af 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpoint.java
@@ -140,7 +140,7 @@ public void testRegionReplicaReplicationPeerIsCreated() throws IOException, Repl
}
HTableDescriptor htd = HTU.createTableDescriptor(
- "testReplicationPeerIsCreated_no_region_replicas");
+ TableName.valueOf("testReplicationPeerIsCreated_no_region_replicas"));
HTU.getAdmin().createTable(htd);
try {
peerConfig = admin.getReplicationPeerConfig(peerId);
@@ -150,7 +150,7 @@ public void testRegionReplicaReplicationPeerIsCreated() throws IOException, Repl
}
assertNull(peerConfig);
- htd = HTU.createTableDescriptor("testReplicationPeerIsCreated");
+ htd = HTU.createTableDescriptor(TableName.valueOf("testReplicationPeerIsCreated"));
htd.setRegionReplication(2);
HTU.getAdmin().createTable(htd);
@@ -183,8 +183,8 @@ public void testRegionReplicaReplicationPeerIsCreatedForModifyTable() throws Exc
peerConfig = null;
}
- HTableDescriptor htd
- = HTU.createTableDescriptor("testRegionReplicaReplicationPeerIsCreatedForModifyTable");
+ HTableDescriptor htd = HTU.createTableDescriptor(
+ TableName.valueOf("testRegionReplicaReplicationPeerIsCreatedForModifyTable"));
HTU.getAdmin().createTable(htd);
// assert that replication peer is not created yet
@@ -216,7 +216,7 @@ public void testRegionReplicaReplication(int regionReplication) throws Exception
// ensure that data is replicated to the secondary region
TableName tableName = TableName.valueOf("testRegionReplicaReplicationWithReplicas_"
+ regionReplication);
- HTableDescriptor htd = HTU.createTableDescriptor(tableName.toString());
+ HTableDescriptor htd = HTU.createTableDescriptor(TableName.valueOf(tableName.toString()));
htd.setRegionReplication(regionReplication);
HTU.getAdmin().createTable(htd);
TableName tableNameNoReplicas =
@@ -399,7 +399,7 @@ private void testRegionReplicaReplicationIgnores(boolean dropTable, boolean disa
TableName toBeDisabledTable = TableName.valueOf(
dropTable ? "droppedTable" : (disableReplication ? "disableReplication" : "disabledTable"));
HTU.deleteTableIfAny(toBeDisabledTable);
- htd = HTU.createTableDescriptor(toBeDisabledTable.toString());
+ htd = HTU.createTableDescriptor(TableName.valueOf(toBeDisabledTable.toString()));
htd.setRegionReplication(regionReplication);
HTU.getAdmin().createTable(htd);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
index 953b0c9ea219..a40f00a1eaee 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestRegionReplicaReplicationEndpointNoMaster.java
@@ -117,7 +117,8 @@ public static void beforeClass() throws Exception {
HTU.startMiniCluster(NB_SERVERS);
// Create table then get the single region for our new table.
- HTableDescriptor htd = HTU.createTableDescriptor(tableName.getNameAsString());
+ HTableDescriptor htd =
+ HTU.createTableDescriptor(TableName.valueOf(tableName.getNameAsString()));
table = HTU.createTable(htd, new byte[][]{f}, null);
try (RegionLocator locator = HTU.getConnection().getRegionLocator(tableName)) {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotManifest.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotManifest.java
index 926a7e5f783f..1dff4c0f3cc9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotManifest.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotManifest.java
@@ -71,7 +71,7 @@ public class TestSnapshotManifest {
@Before
public void setup() throws Exception {
- TEST_UTIL = HBaseTestingUtility.createLocalHTU();
+ TEST_UTIL = new HBaseTestingUtility();
rootDir = TEST_UTIL.getDataTestDir(TABLE_NAME_STR);
fs = TEST_UTIL.getTestFileSystem();