From fa3918d3006abcacc3c8926b1e943d39ac3f3611 Mon Sep 17 00:00:00 2001 From: Andrew Kyle Purtell Date: Tue, 30 Apr 2013 01:51:14 +0000 Subject: [PATCH] Revert HBASE-8453, HBASE-8454. git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1477448 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/hadoop/hbase/HBaseTestingUtility.java | 4 ---- .../hadoop/hbase/mapreduce/TestImportExport.java | 10 ++-------- .../apache/hadoop/hbase/mapreduce/TestImportTsv.java | 6 +----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index 53af8384def..809e77275f2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -1997,10 +1997,6 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { return dfsCluster; } - public MiniMRCluster getMRCluster() { - return mrCluster; - } - public void setDFSCluster(MiniDFSCluster cluster) throws IOException { if (dfsCluster != null && dfsCluster.isClusterUp()) { throw new IOException("DFSCluster is already running! Shut it down first."); 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 5c35ee7f226..23c14c8ccc5 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 @@ -26,7 +26,6 @@ import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; @@ -42,7 +41,6 @@ import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.filter.PrefixFilter; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.util.GenericOptionsParser; import org.junit.After; @@ -105,9 +103,7 @@ public class TestImportExport { GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()), args); Configuration conf = opts.getConfiguration(); args = opts.getRemainingArgs(); - JobConf jobConf = UTIL.getMRCluster().createJobConf(); - HBaseConfiguration.merge(jobConf, conf); - Job job = Export.createSubmittableJob(jobConf, args); + Job job = Export.createSubmittableJob(conf, args); job.waitForCompletion(false); return job.isSuccessful(); } @@ -125,9 +121,7 @@ public class TestImportExport { GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()), args); Configuration conf = opts.getConfiguration(); args = opts.getRemainingArgs(); - JobConf jobConf = UTIL.getMRCluster().createJobConf(); - HBaseConfiguration.merge(jobConf, conf); - Job job = Import.createSubmittableJob(jobConf, args); + Job job = Import.createSubmittableJob(conf, args); job.waitForCompletion(false); return job.isSuccessful(); } 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 8c0094b46c5..d6fa892da9e 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 @@ -38,7 +38,6 @@ import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.LargeTests; @@ -47,7 +46,6 @@ import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.Utils.OutputFileUtils.OutputFilesFilter; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; @@ -222,9 +220,7 @@ public class TestImportTsv implements Configurable { argv.add(inputPath.toString()); Tool tool = new ImportTsv(); LOG.debug("Running ImportTsv with arguments: " + argv); - JobConf jobConf = util.getMRCluster().createJobConf(); - HBaseConfiguration.merge(jobConf, conf); - assertEquals(0, ToolRunner.run(jobConf, tool, argv.toArray(args))); + assertEquals(0, ToolRunner.run(conf, tool, argv.toArray(args))); // Perform basic validation. If the input args did not include // ImportTsv.BULK_OUTPUT_CONF_KEY then validate data in the table.