hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1477374 - in /hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase: HBaseTestingUtility.java mapreduce/TestImportExport.java
Date Mon, 29 Apr 2013 22:11:21 GMT
Author: apurtell
Date: Mon Apr 29 22:11:21 2013
New Revision: 1477374

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

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

Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1477374&r1=1477373&r2=1477374&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Mon Apr 29 22:11:21 2013
@@ -1996,6 +1996,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/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java?rev=1477374&r1=1477373&r2=1477374&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
Mon Apr 29 22:11:21 2013
@@ -26,6 +26,7 @@ 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;
@@ -41,6 +42,7 @@ import org.apache.hadoop.hbase.client.Sc
 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;
@@ -103,7 +105,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();
   }
@@ -121,7 +125,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