diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index b3f2a39..e0d4d17 100644 --- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -2012,6 +2012,8 @@ public void setSparkConfigUpdated(boolean isSparkConfigUpdated) { LLAP_ORC_CACHE_ALLOCATE_DIRECT("hive.llap.io.cache.direct", true, ""), LLAP_USE_LRFU("hive.llap.io.use.lrfu", false, ""), LLAP_LRFU_LAMBDA("hive.llap.io.lrfu.lambda", 0.01f, ""), + LLAP_AUTO_ALLOW_UBER("hive.llap.auto.allow.uber", true, + "Whether or not to allow the planner to run vertices in the AM"), LLAP_AUTO_ENFORCE_TREE("hive.llap.auto.enforce.tree", true, "Enforce that all parents are in llap, before considering vertex"), LLAP_AUTO_ENFORCE_VECTORIZED("hive.llap.auto.enforce.vectorized", true, diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/LlapDecider.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/LlapDecider.java index 79308b0..0a22f20 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/LlapDecider.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/LlapDecider.java @@ -132,11 +132,14 @@ private void handleWork(TezWork tezWork, BaseWork work) private void convertWork(TezWork tezWork, BaseWork work) throws SemanticException { - // let's see if we can go one step further and just uber this puppy - if (tezWork.getChildren(work).isEmpty() - && work instanceof ReduceWork - && ((ReduceWork) work).getNumReduceTasks() == 1) { - work.setUberMode(true); + + if (HiveConf.getBoolVar(conf, HiveConf.ConfVars.LLAP_AUTO_ALLOW_UBER)) { + // let's see if we can go one step further and just uber this puppy + if (tezWork.getChildren(work).isEmpty() + && work instanceof ReduceWork + && ((ReduceWork) work).getNumReduceTasks() == 1) { + work.setUberMode(true); + } } // always mark as llap