From 03859cfd0f91dbee47f3e95f73218a228a450031 Mon Sep 17 00:00:00 2001 From: chenheng Date: Thu, 29 Oct 2015 14:09:16 +0800 Subject: [PATCH] HBASE-14684 Try to remove all MiniMapReduceCluster in unit tests --- .../org/apache/hadoop/hbase/mapred/TestTableInputFormat.java | 8 ++++---- .../org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java | 2 -- .../hadoop/hbase/mapreduce/MultiTableInputFormatTestBase.java | 3 --- .../hadoop/hbase/mapreduce/TableSnapshotInputFormatTestBase.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestCopyTable.java | 2 -- .../org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java | 9 +-------- .../apache/hadoop/hbase/mapreduce/TestHFileOutputFormat2.java | 6 ------ .../apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestHashTable.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java | 2 -- .../hbase/mapreduce/TestImportTSVWithOperationAttributes.java | 3 --- .../org/apache/hadoop/hbase/mapreduce/TestImportTSVWithTTLs.java | 2 -- .../hbase/mapreduce/TestImportTSVWithVisibilityLabels.java | 3 --- .../java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java | 2 -- .../apache/hadoop/hbase/mapreduce/TestMultiTableInputFormat.java | 3 --- .../hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java | 2 -- .../org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java | 2 -- .../hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java | 3 --- .../apache/hadoop/hbase/mapreduce/TestTableMapReduceBase.java | 2 -- .../org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java | 2 -- .../java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java | 2 -- pom.xml | 2 +- 25 files changed, 6 insertions(+), 66 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java index ff19879..f4ca3a3 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java @@ -34,6 +34,7 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.client.Connection; @@ -80,7 +81,7 @@ 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 }; @@ -88,12 +89,10 @@ public class TestTableInputFormat { @BeforeClass public static void beforeClass() throws Exception { UTIL.startMiniCluster(); - mrCluster = UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - UTIL.shutdownMiniMapReduceCluster(); UTIL.shutdownMiniCluster(); } @@ -344,7 +343,8 @@ public class TestTableInputFormat { } void testInputFormat(Class clazz) throws IOException { - final JobConf job = MapreduceTestingShim.getJobConf(mrCluster); + Configuration conf = UTIL.getConfiguration(); + final JobConf job = new JobConf(conf); job.setInputFormat(clazz); job.setOutputFormat(NullOutputFormat.class); job.setMapperClass(ExampleVerifier.class); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java index 8ed7772..a7a6314 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduceUtil.java @@ -89,12 +89,10 @@ public class TestTableMapReduceUtil { public static void beforeClass() throws Exception { UTIL.startMiniCluster(); presidentsTable = createAndFillTable(TableName.valueOf(TABLE_NAME)); - UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - UTIL.shutdownMiniMapReduceCluster(); UTIL.shutdownMiniCluster(); } 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 eaedebf..3874fdc 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 @@ -92,13 +92,10 @@ public abstract class MultiTableInputFormatTestBase { } } } - // start MR cluster - TEST_UTIL.startMiniMapReduceCluster(); } @AfterClass public static void tearDownAfterClass() throws Exception { - TEST_UTIL.shutdownMiniMapReduceCluster(); TEST_UTIL.shutdownMiniCluster(); } 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 3b42f9a..2de7c31 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 @@ -159,14 +159,12 @@ 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(); } } 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 e3d03b8..30b3d19 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 @@ -61,14 +61,12 @@ public class TestCellCounter { @BeforeClass public static void beforeClass() throws Exception { 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(); } 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 5492938..1b703ae 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 @@ -63,12 +63,10 @@ public class TestCopyTable { @BeforeClass public static void beforeClass() throws Exception { TEST_UTIL.startMiniCluster(3); - TEST_UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - TEST_UTIL.shutdownMiniMapReduceCluster(); TEST_UTIL.shutdownMiniCluster(); } 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 2bdcbc1..2a29042 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 @@ -403,13 +403,11 @@ 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", 0, util.countRows(table)); - // Make sure that a directory was created for every CF int dir = 0; for (FileStatus f : testDir.getFileSystem(conf).listStatus(testDir)) { @@ -472,8 +470,7 @@ public class TestHFileOutputFormat { tableDigestBefore, util.checksumRows(table)); } finally { if (admin != null) admin.close(); - util.shutdownMiniMapReduceCluster(); - util.shutdownMiniCluster(); + //util.shutdownMiniCluster(); } } @@ -935,7 +932,6 @@ 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); @@ -974,7 +970,6 @@ public class TestHFileOutputFormat { }, 5000); } finally { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } } @@ -1015,7 +1010,6 @@ 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 @@ -1051,7 +1045,6 @@ public class TestHFileOutputFormat { }, 5000); } finally { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } } 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 e55affc..51299ca 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 @@ -431,7 +431,6 @@ 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,7 +510,6 @@ public class TestHFileOutputFormat2 { } finally { testDir.getFileSystem(conf).delete(testDir, true); util.deleteTable(TABLE_NAME); - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } } @@ -974,7 +972,6 @@ 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); @@ -1016,7 +1013,6 @@ public class TestHFileOutputFormat2 { }, 5000); } finally { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } } @@ -1058,7 +1054,6 @@ 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); @@ -1098,7 +1093,6 @@ public class TestHFileOutputFormat2 { }, 5000); } finally { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } } 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 220bc02..665c836 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 @@ -35,12 +35,10 @@ public class TestHRegionPartitioner { @BeforeClass public static void beforeClass() throws Exception { UTIL.startMiniCluster(); - UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - UTIL.shutdownMiniMapReduceCluster(); UTIL.shutdownMiniCluster(); } 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 762f530..41e0029 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 @@ -57,12 +57,10 @@ public class TestHashTable { @BeforeClass public static void beforeClass() throws Exception { TEST_UTIL.startMiniCluster(3); - TEST_UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - TEST_UTIL.shutdownMiniMapReduceCluster(); TEST_UTIL.shutdownMiniCluster(); } 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 2269fe6..ec5fe6b 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 @@ -108,14 +108,12 @@ public class TestImportExport { // Up the handlers; this test needs more than usual. UTIL.getConfiguration().setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, 10); 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(); } 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 eba843e..dd83ff2 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 @@ -103,13 +103,10 @@ public class TestImportTSVWithOperationAttributes implements Configurable { conf.set("hbase.coprocessor.master.classes", OperationAttributesTestController.class.getName()); conf.set("hbase.coprocessor.region.classes", OperationAttributesTestController.class.getName()); util.startMiniCluster(); - Admin admin = new HBaseAdmin(util.getConfiguration()); - util.startMiniMapReduceCluster(); } @AfterClass public static void releaseCluster() throws Exception { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } 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 268bba2..f932507 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 @@ -89,12 +89,10 @@ public class TestImportTSVWithTTLs implements Configurable { conf.setInt("hfile.format.version", 3); conf.set("hbase.coprocessor.region.classes", TTLCheckingObserver.class.getName()); util.startMiniCluster(); - util.startMiniMapReduceCluster(); } @AfterClass public static void releaseCluster() throws Exception { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java index 5020716..de9d1af 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java @@ -126,8 +126,6 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { // Wait for the labels table to become available util.waitTableEnabled(VisibilityConstants.LABELS_TABLE_NAME.getName(), 50000); createLabels(); - Admin admin = new HBaseAdmin(util.getConfiguration()); - util.startMiniMapReduceCluster(); } private static void createLabels() throws IOException, InterruptedException { @@ -151,7 +149,6 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { @AfterClass public static void releaseCluster() throws Exception { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } 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 5adc04a..3f8b8b3 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 @@ -104,12 +104,10 @@ public class TestImportTsv implements Configurable { @BeforeClass public static void provisionCluster() throws Exception { util.startMiniCluster(); - util.startMiniMapReduceCluster(); } @AfterClass public static void releaseCluster() throws Exception { - util.shutdownMiniMapReduceCluster(); util.shutdownMiniCluster(); } 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 a54df08..120c1a4 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 @@ -81,13 +81,10 @@ 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(); } 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 6b2ee75..0b92354 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 @@ -77,13 +77,11 @@ public class TestMultithreadedTableMapper { 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(); } 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 ef0dc0a..4a9d11c 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 @@ -81,7 +81,6 @@ public class TestRowCounter { public static void setUpBeforeClass() throws Exception { TEST_UTIL.startMiniCluster(); - TEST_UTIL.startMiniMapReduceCluster(); Table table = TEST_UTIL.createTable(TableName.valueOf(TABLE_NAME), Bytes.toBytes(COL_FAM)); writeRows(table); table.close(); @@ -94,7 +93,6 @@ public class TestRowCounter { public static void tearDownAfterClass() throws Exception { TEST_UTIL.shutdownMiniCluster(); - TEST_UTIL.shutdownMiniMapReduceCluster(); } /** 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 2f1bee3..755f43a 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 @@ -65,12 +65,10 @@ public class TestSyncTable { @BeforeClass public static void beforeClass() throws Exception { TEST_UTIL.startMiniCluster(3); - TEST_UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - TEST_UTIL.shutdownMiniMapReduceCluster(); TEST_UTIL.shutdownMiniCluster(); } 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 c53510f..325c168 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 @@ -85,12 +85,10 @@ public class TestTableInputFormat { @BeforeClass public static void beforeClass() throws Exception { UTIL.startMiniCluster(); - mrCluster = UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - UTIL.shutdownMiniMapReduceCluster(); UTIL.shutdownMiniCluster(); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java index b41263c..53988ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java @@ -86,13 +86,10 @@ public abstract class TestTableInputFormatScanBase { // create and fill table table = TEST_UTIL.createMultiRegionTable(TableName.valueOf(TABLE_NAME), INPUT_FAMILY); 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(); } 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 8aed588..805ea42 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 @@ -84,12 +84,10 @@ public abstract class TestTableMapReduceBase { 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(); } 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 cd85756..9470e85 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 @@ -167,7 +167,6 @@ public class TestTimeRangeMapRed { private void runTestOnTable() throws IOException, InterruptedException, ClassNotFoundException { - UTIL.startMiniMapReduceCluster(); Job job = null; try { job = new Job(UTIL.getConfiguration(), "test123"); @@ -184,7 +183,6 @@ 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"))); 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 14cafdf..b9357dd 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 @@ -71,12 +71,10 @@ public class TestWALPlayer { @BeforeClass public static void beforeClass() throws Exception { cluster = TEST_UTIL.startMiniCluster(); - TEST_UTIL.startMiniMapReduceCluster(); } @AfterClass public static void afterClass() throws Exception { - TEST_UTIL.shutdownMiniMapReduceCluster(); TEST_UTIL.shutdownMiniCluster(); } diff --git a/pom.xml b/pom.xml index ba542ea..7bf679e 100644 --- a/pom.xml +++ b/pom.xml @@ -1107,7 +1107,7 @@ 3.0.3 ${compileSource} - 2.5.1 + 2.7.1 ${hadoop-two.version} 3.0.0-SNAPSHOT -- 1.9.3 (Apple Git-50)