PHOENIX-4758 Validate that HADOOP_CONF_DIR is not set for HiveMRIT
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/44c1aaaa Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/44c1aaaa Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/44c1aaaa Branch: refs/heads/master Commit: 44c1aaaa9a4e9b23d71a7abfed5250286e8560aa Parents: 3b1c0d3 Author: Josh Elser <els...@apache.org> Authored: Tue May 29 14:14:04 2018 -0400 Committer: Josh Elser <els...@apache.org> Committed: Mon Jun 4 12:33:17 2018 -0400 ---------------------------------------------------------------------- .../src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/44c1aaaa/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java ---------------------------------------------------------------------- diff --git a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java index 6e880ef..c866921 100644 --- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java +++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java @@ -18,6 +18,10 @@ package org.apache.phoenix.hive; +import static org.junit.Assert.fail; + +import java.util.Map; + import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest; import org.junit.BeforeClass; import org.junit.Ignore; @@ -29,6 +33,10 @@ public class HiveMapReduceIT extends HivePhoenixStoreIT { @BeforeClass public static void setUpBeforeClass() throws Exception { + final String hadoopConfDir = System.getenv("HADOOP_CONF_DIR"); + if (hadoopConfDir != null && hadoopConfDir.length() != 0) { + fail("HADOOP_CONF_DIR is non-empty in the current shell environment which will very likely cause this test to fail."); + } setup(HiveTestUtil.MiniClusterType.mr); }