You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ch...@apache.org on 2015/12/22 09:11:18 UTC
hbase git commit: Revert "HBASE-14684 Try to remove all
MiniMapReduceCluster in unit tests"
Repository: hbase
Updated Branches:
refs/heads/branch-1 a51dc02ed -> cf059e54b
Revert "HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests"
This reverts commit b0965b1805f577b634052191d0c337d3cafabbca.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cf059e54
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cf059e54
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cf059e54
Branch: refs/heads/branch-1
Commit: cf059e54b589ac45769c6f16863aed2debb638b4
Parents: a51dc02
Author: chenheng <ch...@apache.org>
Authored: Tue Dec 22 16:10:58 2015 +0800
Committer: chenheng <ch...@apache.org>
Committed: Tue Dec 22 16:10:58 2015 +0800
----------------------------------------------------------------------
.../hbase/mapreduce/MultiTableInputFormatTestBase.java | 4 +++-
.../mapreduce/TableSnapshotInputFormatTestBase.java | 3 ++-
.../apache/hadoop/hbase/mapreduce/TestCellCounter.java | 3 ++-
.../org/apache/hadoop/hbase/mapreduce/TestCopyTable.java | 3 ++-
.../hadoop/hbase/mapreduce/TestHFileOutputFormat.java | 11 +++++++----
.../hadoop/hbase/mapreduce/TestHFileOutputFormat2.java | 11 ++++++++---
.../hadoop/hbase/mapreduce/TestHRegionPartitioner.java | 3 ++-
.../org/apache/hadoop/hbase/mapreduce/TestHashTable.java | 3 ++-
.../apache/hadoop/hbase/mapreduce/TestImportExport.java | 3 ++-
.../mapreduce/TestImportTSVWithOperationAttributes.java | 4 +++-
.../hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java | 3 ++-
.../org/apache/hadoop/hbase/mapreduce/TestImportTsv.java | 3 ++-
.../hbase/mapreduce/TestMultiTableInputFormat.java | 4 +++-
.../hbase/mapreduce/TestMultithreadedTableMapper.java | 3 ++-
.../apache/hadoop/hbase/mapreduce/TestRowCounter.java | 3 ++-
.../org/apache/hadoop/hbase/mapreduce/TestSyncTable.java | 3 ++-
.../hadoop/hbase/mapreduce/TestTableInputFormat.java | 4 +++-
.../hadoop/hbase/mapreduce/TestTableMapReduceBase.java | 3 ++-
.../hadoop/hbase/mapreduce/TestTimeRangeMapRed.java | 3 ++-
.../org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java | 3 ++-
20 files changed, 55 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java
index 3ecf28d..eaedebf 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java
@@ -78,7 +78,6 @@ public abstract class MultiTableInputFormatTestBase {
public static void setUpBeforeClass() throws Exception {
// switch TIF to log at DEBUG level
TEST_UTIL.enableDebug(MultiTableInputFormatBase.class);
- TEST_UTIL.setJobWithoutMRCluster();
// start mini hbase cluster
TEST_UTIL.startMiniCluster(3);
// create and fill table
@@ -93,10 +92,13 @@ public abstract class MultiTableInputFormatTestBase {
}
}
}
+ // start MR cluster
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java
index 2941286..3808806 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java
@@ -60,7 +60,6 @@ public abstract class TableSnapshotInputFormatTestBase {
public void setupCluster() throws Exception {
setupConf(UTIL.getConfiguration());
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster(NUM_REGION_SERVERS, true);
rootDir = UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
fs = rootDir.getFileSystem(UTIL.getConfiguration());
@@ -159,12 +158,14 @@ public abstract class TableSnapshotInputFormatTestBase {
protected void testWithMapReduce(HBaseTestingUtility util, String snapshotName,
int numRegions, int expectedNumSplits, boolean shutdownCluster) throws Exception {
setupCluster();
+ util.startMiniMapReduceCluster();
try {
Path tableDir = util.getDataTestDirOnTestFS(snapshotName);
TableName tableName = TableName.valueOf("testWithMapReduce");
testWithMapReduceImpl(util, tableName, snapshotName, tableDir, numRegions,
expectedNumSplits, shutdownCluster);
} finally {
+ util.shutdownMiniMapReduceCluster();
tearDownCluster();
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java
index 41b76ba..e3d03b8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java
@@ -60,14 +60,15 @@ public class TestCellCounter {
@BeforeClass
public static void beforeClass() throws Exception {
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
+ UTIL.startMiniMapReduceCluster();
FQ_OUTPUT_DIR = new Path(OUTPUT_DIR).makeQualified(new LocalFileSystem());
FileUtil.fullyDelete(new File(OUTPUT_DIR));
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java
index b8ad5be..5492938 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java
@@ -62,12 +62,13 @@ public class TestCopyTable {
@BeforeClass
public static void beforeClass() throws Exception {
- TEST_UTIL.setJobWithoutMRCluster();
TEST_UTIL.startMiniCluster(3);
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
index b4bae99..2bdcbc1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java
@@ -390,7 +390,6 @@ public class TestHFileOutputFormat {
byte[][] splitKeys = generateRandomSplitKeys(4);
HBaseAdmin admin = null;
try {
- util.setJobWithoutMRCluster();
util.startMiniCluster();
Path testDir = util.getDataTestDirOnTestFS("testLocalMRIncrementalLoad");
admin = util.getHBaseAdmin();
@@ -404,6 +403,7 @@ public class TestHFileOutputFormat {
assertEquals("Should make 5 regions", numRegions, 5);
// Generate the bulk load files
+ util.startMiniMapReduceCluster();
runIncrementalPELoad(conf, table, testDir);
// This doesn't write into the table, just makes files
assertEquals("HFOF should not touch actual table",
@@ -472,6 +472,7 @@ public class TestHFileOutputFormat {
tableDigestBefore, util.checksumRows(table));
} finally {
if (admin != null) admin.close();
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
@@ -918,7 +919,6 @@ public class TestHFileOutputFormat {
generateRandomStartKeys(5);
try {
- util.setJobWithoutMRCluster();
util.startMiniCluster();
final FileSystem fs = util.getDFSCluster().getFileSystem();
HBaseAdmin admin = new HBaseAdmin(conf);
@@ -935,6 +935,7 @@ public class TestHFileOutputFormat {
// Generate two bulk load files
conf.setBoolean("hbase.mapreduce.hfileoutputformat.compaction.exclude",
true);
+ util.startMiniMapReduceCluster();
for (int i = 0; i < 2; i++) {
Path testDir = util.getDataTestDirOnTestFS("testExcludeAllFromMinorCompaction_" + i);
@@ -973,6 +974,7 @@ public class TestHFileOutputFormat {
}, 5000);
} finally {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
@@ -984,10 +986,9 @@ public class TestHFileOutputFormat {
generateRandomStartKeys(5);
try {
- util.setJobWithoutMRCluster();
util.startMiniCluster();
Path testDir = util.getDataTestDirOnTestFS("testExcludeMinorCompaction");
- final FileSystem fs = util.getTestFileSystem();
+ final FileSystem fs = util.getDFSCluster().getFileSystem();
HBaseAdmin admin = new HBaseAdmin(conf);
HTable table = util.createTable(TABLE_NAME, FAMILIES);
assertEquals("Should start with empty table", 0, util.countRows(table));
@@ -1014,6 +1015,7 @@ public class TestHFileOutputFormat {
// Generate a bulk load file with more rows
conf.setBoolean("hbase.mapreduce.hfileoutputformat.compaction.exclude",
true);
+ util.startMiniMapReduceCluster();
runIncrementalPELoad(conf, table, testDir);
// Perform the actual load
@@ -1049,6 +1051,7 @@ public class TestHFileOutputFormat {
}, 5000);
} finally {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java
index bb1a073..e55affc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java
@@ -421,7 +421,6 @@ public class TestHFileOutputFormat2 {
for (int i = 0; i < hostCount; ++i) {
hostnames[i] = "datanode_" + i;
}
- util.setJobWithoutMRCluster();
util.startMiniCluster(1, hostCount, hostnames);
HTable table = util.createTable(TABLE_NAME, FAMILIES, splitKeys);
@@ -432,6 +431,7 @@ public class TestHFileOutputFormat2 {
assertEquals("Should make " + regionNum + " regions", numRegions, regionNum);
// Generate the bulk load files
+ util.startMiniMapReduceCluster();
runIncrementalPELoad(conf, table.getTableDescriptor(), table.getRegionLocator(), testDir);
// This doesn't write into the table, just makes files
assertEquals("HFOF should not touch actual table", 0, util.countRows(table));
@@ -511,6 +511,7 @@ public class TestHFileOutputFormat2 {
} finally {
testDir.getFileSystem(conf).delete(testDir, true);
util.deleteTable(TABLE_NAME);
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
@@ -955,7 +956,7 @@ public class TestHFileOutputFormat2 {
Configuration conf = util.getConfiguration();
conf.setInt("hbase.hstore.compaction.min", 2);
generateRandomStartKeys(5);
- util.setJobWithoutMRCluster();
+
util.startMiniCluster();
try (Connection conn = ConnectionFactory.createConnection();
Admin admin = conn.getAdmin()) {
@@ -973,6 +974,7 @@ public class TestHFileOutputFormat2 {
// Generate two bulk load files
conf.setBoolean("hbase.mapreduce.hfileoutputformat.compaction.exclude",
true);
+ util.startMiniMapReduceCluster();
for (int i = 0; i < 2; i++) {
Path testDir = util.getDataTestDirOnTestFS("testExcludeAllFromMinorCompaction_" + i);
@@ -1014,6 +1016,7 @@ public class TestHFileOutputFormat2 {
}, 5000);
} finally {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
@@ -1023,7 +1026,7 @@ public class TestHFileOutputFormat2 {
Configuration conf = util.getConfiguration();
conf.setInt("hbase.hstore.compaction.min", 2);
generateRandomStartKeys(5);
- util.setJobWithoutMRCluster();
+
util.startMiniCluster();
try (Connection conn = ConnectionFactory.createConnection(conf);
Admin admin = conn.getAdmin()){
@@ -1055,6 +1058,7 @@ public class TestHFileOutputFormat2 {
// Generate a bulk load file with more rows
conf.setBoolean("hbase.mapreduce.hfileoutputformat.compaction.exclude",
true);
+ util.startMiniMapReduceCluster();
RegionLocator regionLocator = conn.getRegionLocator(TABLE_NAME);
runIncrementalPELoad(conf, table.getTableDescriptor(), regionLocator, testDir);
@@ -1094,6 +1098,7 @@ public class TestHFileOutputFormat2 {
}, 5000);
} finally {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java
index 4354da5..220bc02 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java
@@ -34,12 +34,13 @@ public class TestHRegionPartitioner {
@BeforeClass
public static void beforeClass() throws Exception {
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
+ UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java
index eae33a6..762f530 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java
@@ -56,12 +56,13 @@ public class TestHashTable {
@BeforeClass
public static void beforeClass() throws Exception {
- TEST_UTIL.setJobWithoutMRCluster();
TEST_UTIL.startMiniCluster(3);
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
index 2154f99..2e06fab 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
@@ -107,14 +107,15 @@ public class TestImportExport {
public static void beforeClass() throws Exception {
// Up the handlers; this test needs more than usual.
UTIL.getConfiguration().setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, 10);
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
+ UTIL.startMiniMapReduceCluster();
FQ_OUTPUT_DIR =
new Path(OUTPUT_DIR).makeQualified(FileSystem.get(UTIL.getConfiguration())).toString();
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithOperationAttributes.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithOperationAttributes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithOperationAttributes.java
index acb0e7c..eba843e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithOperationAttributes.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithOperationAttributes.java
@@ -102,12 +102,14 @@ public class TestImportTSVWithOperationAttributes implements Configurable {
conf = util.getConfiguration();
conf.set("hbase.coprocessor.master.classes", OperationAttributesTestController.class.getName());
conf.set("hbase.coprocessor.region.classes", OperationAttributesTestController.class.getName());
- util.setJobWithoutMRCluster();
util.startMiniCluster();
+ Admin admin = new HBaseAdmin(util.getConfiguration());
+ util.startMiniMapReduceCluster();
}
@AfterClass
public static void releaseCluster() throws Exception {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java
index 5add5d4..268bba2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java
@@ -88,12 +88,13 @@ public class TestImportTSVWithTTLs implements Configurable {
// need this where the default hfile version is not 3 (i.e. 0.98)
conf.setInt("hfile.format.version", 3);
conf.set("hbase.coprocessor.region.classes", TTLCheckingObserver.class.getName());
- util.setJobWithoutMRCluster();
util.startMiniCluster();
+ util.startMiniMapReduceCluster();
}
@AfterClass
public static void releaseCluster() throws Exception {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
index 40c4b4d..5adc04a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java
@@ -103,12 +103,13 @@ public class TestImportTsv implements Configurable {
@BeforeClass
public static void provisionCluster() throws Exception {
- util.setJobWithoutMRCluster();
util.startMiniCluster();
+ util.startMiniMapReduceCluster();
}
@AfterClass
public static void releaseCluster() throws Exception {
+ util.shutdownMiniMapReduceCluster();
util.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java
index 14edc30..a54df08 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java
@@ -71,7 +71,6 @@ public class TestMultiTableInputFormat {
// switch TIF to log at DEBUG level
TEST_UTIL.enableDebug(MultiTableInputFormat.class);
TEST_UTIL.enableDebug(MultiTableInputFormatBase.class);
- TEST_UTIL.setJobWithoutMRCluster();
// start mini hbase cluster
TEST_UTIL.startMiniCluster(3);
// create and fill table
@@ -82,10 +81,13 @@ public class TestMultiTableInputFormat {
TEST_UTIL.loadTable(table, INPUT_FAMILY, false);
}
}
+ // start MR cluster
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
index 9a81990..6b2ee75 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
@@ -72,17 +72,18 @@ public class TestMultithreadedTableMapper {
public static void beforeClass() throws Exception {
// Up the handlers; this test needs more than usual.
UTIL.getConfiguration().setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, 10);
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
HTable table =
UTIL.createMultiRegionTable(MULTI_REGION_TABLE_NAME, new byte[][] { INPUT_FAMILY,
OUTPUT_FAMILY });
UTIL.loadTable(table, INPUT_FAMILY, false);
+ UTIL.startMiniMapReduceCluster();
UTIL.waitUntilAllRegionsAssigned(MULTI_REGION_TABLE_NAME);
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java
index 0e04c67..817e7a9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java
@@ -80,8 +80,8 @@ public class TestRowCounter {
@BeforeClass
public static void setUpBeforeClass()
throws Exception {
- TEST_UTIL.setJobWithoutMRCluster();
TEST_UTIL.startMiniCluster();
+ TEST_UTIL.startMiniMapReduceCluster();
Table table = TEST_UTIL.createTable(TableName.valueOf(TABLE_NAME), Bytes.toBytes(COL_FAM));
writeRows(table);
table.close();
@@ -94,6 +94,7 @@ public class TestRowCounter {
public static void tearDownAfterClass()
throws Exception {
TEST_UTIL.shutdownMiniCluster();
+ TEST_UTIL.shutdownMiniMapReduceCluster();
}
/**
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java
index 1b356e6..2f1bee3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java
@@ -64,12 +64,13 @@ public class TestSyncTable {
@BeforeClass
public static void beforeClass() throws Exception {
- TEST_UTIL.setJobWithoutMRCluster();
TEST_UTIL.startMiniCluster(3);
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
index d404833..c53510f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java
@@ -77,18 +77,20 @@ public class TestTableInputFormat {
private static final Log LOG = LogFactory.getLog(TestTableInputFormat.class);
private final static HBaseTestingUtility UTIL = new HBaseTestingUtility();
+ private static MiniMRCluster mrCluster;
static final byte[] FAMILY = Bytes.toBytes("family");
private static final byte[][] columns = new byte[][] { FAMILY };
@BeforeClass
public static void beforeClass() throws Exception {
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
+ mrCluster = UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
index 022d4c9..8aed588 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java
@@ -79,16 +79,17 @@ public abstract class TestTableMapReduceBase {
@BeforeClass
public static void beforeClass() throws Exception {
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
HTable table =
UTIL.createMultiRegionTable(MULTI_REGION_TABLE_NAME, new byte[][] { INPUT_FAMILY,
OUTPUT_FAMILY });
UTIL.loadTable(table, INPUT_FAMILY, false);
+ UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ UTIL.shutdownMiniMapReduceCluster();
UTIL.shutdownMiniCluster();
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
index 207f256..cd85756 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
@@ -83,7 +83,6 @@ public class TestTimeRangeMapRed {
@BeforeClass
public static void beforeClass() throws Exception {
- UTIL.setJobWithoutMRCluster();
UTIL.startMiniCluster();
}
@@ -168,6 +167,7 @@ public class TestTimeRangeMapRed {
private void runTestOnTable()
throws IOException, InterruptedException, ClassNotFoundException {
+ UTIL.startMiniMapReduceCluster();
Job job = null;
try {
job = new Job(UTIL.getConfiguration(), "test123");
@@ -184,6 +184,7 @@ public class TestTimeRangeMapRed {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
+ UTIL.shutdownMiniMapReduceCluster();
if (job != null) {
FileUtil.fullyDelete(
new File(job.getConfiguration().get("hadoop.tmp.dir")));
http://git-wip-us.apache.org/repos/asf/hbase/blob/cf059e54/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
index 343fc64..d6929a2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
@@ -70,12 +70,13 @@ public class TestWALPlayer {
@BeforeClass
public static void beforeClass() throws Exception {
- TEST_UTIL.setJobWithoutMRCluster();
cluster = TEST_UTIL.startMiniCluster();
+ TEST_UTIL.startMiniMapReduceCluster();
}
@AfterClass
public static void afterClass() throws Exception {
+ TEST_UTIL.shutdownMiniMapReduceCluster();
TEST_UTIL.shutdownMiniCluster();
}