Repository: hive Updated Branches: refs/heads/master d3fed078c -> e54acc611
HIVE-18972 : beeline command suggestion to kill job deprecated (Bharathkrishna Guruvayoor Murali via Vihang Karajgaonkar) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e54acc61 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e54acc61 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e54acc61 Branch: refs/heads/master Commit: e54acc6114d1dec55b8d0bf42cb8d8de0ed305bd Parents: d3fed07 Author: Bharathkrishna Guruvayoor Murali <bhar...@cloudera.com> Authored: Wed Apr 4 11:34:12 2018 -0700 Committer: Vihang Karajgaonkar <vih...@cloudera.com> Committed: Wed Apr 4 12:44:46 2018 -0700 ---------------------------------------------------------------------- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java | 6 ++++++ .../org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/e54acc61/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 1fd824b..5f07312 100644 --- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -616,6 +616,7 @@ public class HiveConf extends Configuration { // values will override any values set in the underlying Hadoop configuration. HADOOPBIN("hadoop.bin.path", findHadoopBinary(), "", true), YARNBIN("yarn.bin.path", findYarnBinary(), "", true), + MAPREDBIN("mapred.bin.path", findMapRedBinary(), "", true), HIVE_FS_HAR_IMPL("fs.har.impl", "org.apache.hadoop.hive.shims.HiveHarFileSystem", "The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop versions less than 0.20"), MAPREDMAXSPLITSIZE(FileInputFormat.SPLIT_MAXSIZE, 256000000L, "", true), @@ -3956,6 +3957,11 @@ public class HiveConf extends Configuration { val = (val == null ? "yarn" : val + File.separator + "bin" + File.separator + "yarn"); return val; } + private static String findMapRedBinary() { + String val = findHadoopHome(); + val = (val == null ? "mapred" : val + File.separator + "bin" + File.separator + "mapred"); + return val; + } private static String findHadoopHome() { String val = System.getenv("HADOOP_HOME"); http://git-wip-us.apache.org/repos/asf/hive/blob/e54acc61/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java index eb3a11a..fcdc996 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java @@ -450,7 +450,7 @@ public class HadoopJobExecHelper { } console.printInfo(getJobStartMsg(rj.getID()) + ", Tracking URL = " + rj.getTrackingURL()); - console.printInfo("Kill Command = " + HiveConf.getVar(job, HiveConf.ConfVars.HADOOPBIN) + console.printInfo("Kill Command = " + HiveConf.getVar(job, ConfVars.MAPREDBIN) + " job -kill " + rj.getID()); } }