hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1494256 - in /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase: HBaseTestingUtility.java mapreduce/TestImportExport.java
Date Tue, 18 Jun 2013 18:54:15 GMT
Author: stack
Date: Tue Jun 18 18:54:14 2013
New Revision: 1494256

URL: http://svn.apache.org/r1494256
Log:
HBASE-6891 TestImportExport failing again due to configuration issues

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1494256&r1=1494255&r2=1494256&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Tue Jun 18 18:54:14 2013
@@ -2044,6 +2044,10 @@ public class HBaseTestingUtility extends
     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.");

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java?rev=1494256&r1=1494255&r2=1494256&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
Tue Jun 18 18:54:14 2013
@@ -31,6 +31,7 @@ import java.util.List;
 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;
@@ -50,6 +51,7 @@ import org.apache.hadoop.hbase.io.Immuta
 import org.apache.hadoop.hbase.mapreduce.Import.KeyValueImporter;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.LauncherSecurityManager;
+import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.Mapper.Context;
 import org.apache.hadoop.util.GenericOptionsParser;
@@ -117,7 +119,9 @@ public class TestImportExport {
     GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()),
args);
     Configuration conf = opts.getConfiguration();
     args = opts.getRemainingArgs();
-    Job job = Export.createSubmittableJob(conf, args);
+    JobConf jobConf = UTIL.getMRCluster().createJobConf();
+    HBaseConfiguration.merge(jobConf, conf);
+    Job job = Export.createSubmittableJob(jobConf, args);
     job.waitForCompletion(false);
     return job.isSuccessful();
   }
@@ -135,7 +139,9 @@ public class TestImportExport {
     GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()),
args);
     Configuration conf = opts.getConfiguration();
     args = opts.getRemainingArgs();
-    Job job = Import.createSubmittableJob(conf, args);
+    JobConf jobConf = UTIL.getMRCluster().createJobConf();
+    HBaseConfiguration.merge(jobConf, conf);
+    Job job = Import.createSubmittableJob(jobConf, args);
     job.waitForCompletion(false);
     return job.isSuccessful();
   }



Mime
View raw message