From d1c5b7cbd2e160e5e8d1edf147fcc3af22203328 Mon Sep 17 00:00:00 2001 From: Jonathan Hsieh Date: Tue, 14 May 2013 20:27:11 +0000 Subject: [PATCH] HBASE-8528 [hadoop2] TestMultiTableInputFormat always hadoop with YARN-129 applied (with Gary Helmling) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1482561 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/HBaseTestingUtility.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 809e77275f2..4ae00966be4 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 @@ -1683,10 +1683,13 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { conf.get("mapred.local.dir")); //Hadoop MiniMR overwrites this while it should not LOG.info("Mini mapreduce cluster started"); - // Needed for TestImportTsv. + // In hadoop2, YARN/MR2 starts a mini cluster with its own conf instance and updates settings. + // Our HBase MR jobs need several of these settings in order to properly run. So we copy the + // necessary config properties here. YARN-129 required adding a few properties. conf.set("mapred.job.tracker", jobConf.get("mapred.job.tracker")); // this for mrv2 support; mr1 ignores this conf.set("mapreduce.framework.name", "yarn"); + conf.setBoolean("yarn.is.minicluster", true); String rmAddress = jobConf.get("yarn.resourcemanager.address"); if (rmAddress != null) { conf.set("yarn.resourcemanager.address", rmAddress);