Repository: hive
Updated Branches:
  refs/heads/master ee3a3ed35 -> 4408b8d80


HIVE-16573: In-place update for HoS can't be disabled (Bing Li reviewed by Rui 
and Anishek)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4408b8d8
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4408b8d8
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4408b8d8

Branch: refs/heads/master
Commit: 4408b8d80cacd646fe6eabae62df68e873a10a02
Parents: ee3a3ed
Author: Bing Li <[email protected]>
Authored: Wed Jun 7 13:40:20 2017 +0800
Committer: Rui Li <[email protected]>
Committed: Wed Jun 7 13:40:20 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/common/log/InPlaceUpdate.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/4408b8d8/common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java
----------------------------------------------------------------------
diff --git 
a/common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java 
b/common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java
index 1e026a7..2905265 100644
--- a/common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java
+++ b/common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java
@@ -187,7 +187,16 @@ public class InPlaceUpdate {
 
 
   public static boolean canRenderInPlace(HiveConf conf) {
-    boolean inPlaceUpdates = HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.TEZ_EXEC_INPLACE_PROGRESS);
+    String engine = HiveConf.getVar(conf, 
HiveConf.ConfVars.HIVE_EXECUTION_ENGINE);
+    boolean inPlaceUpdates = false;
+
+    if (engine.equals("tez")) {
+      inPlaceUpdates = HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.TEZ_EXEC_INPLACE_PROGRESS);
+    }
+
+    if (engine.equals("spark")) {
+      inPlaceUpdates = HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.SPARK_EXEC_INPLACE_PROGRESS);
+    }
 
     // we need at least 80 chars wide terminal to display in-place updates 
properly
     return inPlaceUpdates && isUnixTerminal() && 
TerminalFactory.get().getWidth() >= MIN_TERMINAL_WIDTH;

Reply via email to