hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1337448 - /hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Date Sat, 12 May 2012 05:48:04 GMT
Author: stack
Date: Sat May 12 05:48:04 2012
New Revision: 1337448

URL: http://svn.apache.org/viewvc?rev=1337448&view=rev
Log:
HBASE-5966 MapReduce based tests broken on Hadoop 2.0.0-alpha

Modified:
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1337448&r1=1337447&r2=1337448&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java Sat May 12
05:48:04 2012
@@ -1334,17 +1334,26 @@ public class HBaseTestingUtility {
     mrCluster = new MiniMRCluster(servers,
       FS_URI != null ? FS_URI : FileSystem.get(conf).getUri().toString(), 1);
     JobConf jobConf = MapreduceTestingShim.getJobConf(mrCluster);
-    if (jobConf != null) {
-      jobConf.set("mapred.local.dir",
-          conf.get("mapred.local.dir")); //Hadoop MiniMR overwrites this while it should
not
+    if (jobConf == null) {
+      jobConf = mrCluster.createJobConf();
     }
+    jobConf.set("mapred.local.dir",
+      conf.get("mapred.local.dir")); //Hadoop MiniMR overwrites this while it should not
     LOG.info("Mini mapreduce cluster started");
 
     // Needed for TestImportTsv.
-    conf.set("mapred.job.tracker",
-        mrCluster.createJobConf().get("mapred.job.tracker"));
+    conf.set("mapred.job.tracker", jobConf.get("mapred.job.tracker"));
     // this for mrv2 support; mr1 ignores this 
     conf.set("mapreduce.framework.name", "yarn");
+    String rmAdress = jobConf.get("yarn.resourcemanager.address");
+    if (rmAdress != null) {
+      conf.set("yarn.resourcemanager.address", rmAdress);
+    }
+    String schedulerAdress =
+      jobConf.get("yarn.resourcemanager.scheduler.address");
+    if (schedulerAdress != null) {
+      conf.set("yarn.resourcemanager.scheduler.address", schedulerAdress);
+    }
   }
 
   /**



Mime
View raw message