diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 2b8ccc5..d9838fe 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -2412,7 +2412,7 @@ public Properties getAllProperties() { return getProperties(this); } - private static Properties getProperties(Configuration conf) { + public static Properties getProperties(Configuration conf) { Iterator> iter = conf.iterator(); Properties p = new Properties(); while (iter.hasNext()) { diff --git ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java index bc9254c..9a9052f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java +++ ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java @@ -29,6 +29,7 @@ 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.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; @@ -259,7 +260,22 @@ public CommandProcessorResponse run(String command) { } 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(); }