You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ct...@apache.org on 2016/12/21 13:52:24 UTC
hive git commit: HIVE-15446: Hive fails in recursive debug (Chaoyu
Tang, reviewed by Naveen Gangam)
Repository: hive
Updated Branches:
refs/heads/master c531ae1a2 -> 66f13472e
HIVE-15446: Hive fails in recursive debug (Chaoyu Tang, reviewed by Naveen Gangam)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/66f13472
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/66f13472
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/66f13472
Branch: refs/heads/master
Commit: 66f13472e94a18cdc83093d6426b1cc494ab9405
Parents: c531ae1
Author: Chaoyu Tang <ct...@cloudera.com>
Authored: Wed Dec 21 08:51:10 2016 -0500
Committer: Chaoyu Tang <ct...@cloudera.com>
Committed: Wed Dec 21 08:51:10 2016 -0500
----------------------------------------------------------------------
.../java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/66f13472/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
index 17db852..1bd4db7 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
@@ -342,6 +342,15 @@ public class MapRedTask extends ExecDriver implements Serializable {
+ " environment variable must be set to \"y\" or \"n\" when debugging";
if (environmentVariables.get(HIVE_DEBUG_RECURSIVE).equals("y")) {
+ // HADOOP_CLIENT_OPTS is appended to HADOOP_OPTS in HADOOP.sh, so we should remove the old
+ // HADOOP_CLIENT_OPTS which might have the main debug options from current HADOOP_OPTS. A new
+ // HADOOP_CLIENT_OPTS is created with child JVM debug options, and it will be appended to
+ // HADOOP_OPTS agina when HADOOP.sh is executed for the child process.
+ assert environmentVariables.containsKey(HADOOP_OPTS_KEY)
+ && environmentVariables.get(HADOOP_OPTS_KEY) != null: HADOOP_OPTS_KEY
+ + " environment variable must have been set.";
+ environmentVariables.put(HADOOP_OPTS_KEY, environmentVariables.get(HADOOP_OPTS_KEY)
+ .replace(environmentVariables.get(HADOOP_CLIENT_OPTS), ""));
// swap debug options in HADOOP_CLIENT_OPTS to those that the child JVM should have
assert environmentVariables.containsKey(HIVE_CHILD_CLIENT_DEBUG_OPTS)
&& environmentVariables.get(HIVE_CHILD_CLIENT_DEBUG_OPTS) != null : HIVE_CHILD_CLIENT_DEBUG_OPTS