You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2015/10/23 00:33:37 UTC

hive git commit: HIVE-12201: Tez settings need to be shown in set -v output when execution engine is tez. (Gunther Hagleitner)

Repository: hive
Updated Branches:
  refs/heads/master 2fd619b7a -> 54116481e


HIVE-12201: Tez settings need to be shown in set -v output when execution engine is tez. (Gunther Hagleitner)


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

Branch: refs/heads/master
Commit: 54116481ee161fa8b1b1b51095510b1bd0c0e770
Parents: 2fd619b
Author: Gunther Hagleitner <gu...@apache.org>
Authored: Thu Oct 22 15:30:56 2015 -0700
Committer: Gunther Hagleitner <gu...@apache.org>
Committed: Thu Oct 22 15:30:56 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/conf/HiveConf.java     |  2 +-
 .../hadoop/hive/ql/processors/SetProcessor.java   | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/54116481/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
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 6c7adbd..23ae0dc 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -2878,7 +2878,7 @@ public class HiveConf extends Configuration {
     return getProperties(this);
   }
 
-  private static Properties getProperties(Configuration conf) {
+  public static Properties getProperties(Configuration conf) {
     Iterator<Map.Entry<String, String>> iter = conf.iterator();
     Properties p = new Properties();
     while (iter.hasNext()) {

http://git-wip-us.apache.org/repos/asf/hive/blob/54116481/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java b/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
index 06a83ae..2226300 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java
@@ -29,6 +29,7 @@ import java.util.Properties;
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveVariableSource;
 import org.apache.hadoop.hive.conf.VariableSubstitution;
@@ -288,7 +289,22 @@ public class SetProcessor implements CommandProcessor {
     }
 
     if (nwcmd.equals("-v")) {
-      dumpOptions(ss.getConf().getAllProperties());
+      Properties properties = null;
+      if (ss.getConf().getVar(HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) {
+        Class<?> clazz;
+        try {
+          clazz = Class.forName("org.apache.tez.dag.api.TezConfiguration");
+
+          Configuration tezConf =
+              (Configuration) clazz.getConstructor(Configuration.class).newInstance(ss.getConf());
+          properties = HiveConf.getProperties(tezConf);
+        } catch (Exception e) {
+          return new CommandProcessorResponse(1, e.getMessage(), "42000", e);
+        }
+      } else {
+        properties = ss.getConf().getAllProperties();
+      }
+      dumpOptions(properties);
       return createProcessorSuccessResponse();
     }