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) @@ -38,8 +38,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 +1557,22 @@ } } + /* + * Copies Configuration entries from src to dst, overwriting existing entries with same keys + * @param src source Configuration + * @param dst destination Configuration + * @return destination Configuration + */ + private Configuration copyConfEntries(Configuration src, Configuration dst) { + if (src == null || src.size() == 0) return dst; + Iterator> iter = src.iterator(); + while (iter.hasNext()) { + Entry entry = iter.next(); + dst.set(entry.getKey(), entry.getValue()); + } + return dst; + } + /** * Starts a MiniMRCluster. Call {@link #setFileSystemURI(String)} to use a different * filesystem. @@ -1579,6 +1597,7 @@ if (jobConf == null) { jobConf = mrCluster.createJobConf(); } + copyConfEntries(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: dev-support/test-patch.sh =================================================================== --- dev-support/test-patch.sh (revision 1454616) +++ dev-support/test-patch.sh (working copy) @@ -354,6 +354,11 @@ echo "" echo "" + patchForHadoop2=`$GREP -c -i 'This patch uses hadoop-2.0 as default profile' $PATCH_DIR/patch` + if [[ $patchForHadoop2 != 0 ]] ; then + return 0; + fi + export MAVEN_OPTS="${MAVEN_OPTS}" # build core and tests $MVN clean test help:active-profiles -X -DskipTests -Dhadoop.profile=2.0 -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/trunk2.0JavacWarnings.txt 2>&1 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