hadoop.profile=2.0 Index: hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (revision 1454616) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java (working copy) @@ -1,5 +1,3 @@ - - /** * * Licensed to the Apache Software Foundation (ASF) under one @@ -38,8 +36,10 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.NavigableSet; import java.util.Random; import java.util.Set; @@ -1555,6 +1555,28 @@ } } + /* + * Copies Configuration entries which are absent in dst from src to dst + * @param src source Configuration + * @param dst destination Configuration + * @return destination Configuration + */ + private Configuration copyNewConfEntries(Configuration src, Configuration dst) { + if (src == null || src.size() == 0) return dst; + Iterator> iter = src.iterator(); + int entriesAdded = 0; + while (iter.hasNext()) { + Entry entry = iter.next(); + if (dst.get(entry.getKey()) == null) { + LOG.debug("copying " + entry.getKey() + " = " + entry.getValue()); + dst.set(entry.getKey(), entry.getValue()); + entriesAdded++; + } + } + LOG.debug("Added " + entriesAdded + " entries to conf"); + return dst; + } + /** * Starts a MiniMRCluster. Call {@link #setFileSystemURI(String)} to use a different * filesystem. @@ -1579,6 +1601,7 @@ if (jobConf == null) { jobConf = mrCluster.createJobConf(); } + copyNewConfEntries(jobConf, this.conf); jobConf.set("mapred.local.dir", conf.get("mapred.local.dir")); //Hadoop MiniMR overwrites this while it should not LOG.info("Mini mapreduce cluster started"); Index: hbase-server/pom.xml =================================================================== --- hbase-server/pom.xml (revision 1454616) +++ hbase-server/pom.xml (working copy) @@ -559,7 +559,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -581,8 +582,7 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile Index: pom.xml =================================================================== --- pom.xml (revision 1454616) +++ pom.xml (working copy) @@ -865,7 +865,7 @@ 1.6 ${project.version} - 2.0.2-alpha + 2.0.4-SNAPSHOT 1.1.1 1.2 1.7 @@ -1415,7 +1415,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -1473,16 +1474,15 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile hbase-hadoop2-compat + ${hadoop-two.version} 1.6.1 - ${hadoop-two.version} hbase-hadoop2-compat src/assembly/hadoop-two-compat.xml Index: hbase-it/pom.xml =================================================================== --- hbase-it/pom.xml (revision 1454616) +++ hbase-it/pom.xml (working copy) @@ -172,7 +172,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -195,8 +196,7 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile Index: hbase-examples/pom.xml =================================================================== --- hbase-examples/pom.xml (revision 1454616) +++ hbase-examples/pom.xml (working copy) @@ -97,7 +97,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -119,8 +120,7 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile Index: hbase-client/pom.xml =================================================================== --- hbase-client/pom.xml (revision 1454616) +++ hbase-client/pom.xml (working copy) @@ -102,7 +102,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -121,8 +122,7 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile Index: hbase-common/pom.xml =================================================================== --- hbase-common/pom.xml (revision 1454616) +++ hbase-common/pom.xml (working copy) @@ -151,7 +151,8 @@ hadoop-1.0 - !hadoop.profile + hadoop.profile + 1.0 @@ -170,8 +171,7 @@ hadoop-2.0 - hadoop.profile - 2.0 + !hadoop.profile