You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/09/21 03:58:37 UTC
hive git commit: HIVE-11717: nohup mode is not support for new hive cli(Ferdinand Xu, reviewed by Xuefu Zhang)
Repository: hive
Updated Branches:
refs/heads/beeline-cli fdf6bd0b5 -> dc9ca294e
HIVE-11717: nohup mode is not support for new hive cli(Ferdinand Xu, reviewed by Xuefu Zhang)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/dc9ca294
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/dc9ca294
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/dc9ca294
Branch: refs/heads/beeline-cli
Commit: dc9ca294eff7f4309beb18cb540b6eccbe7e0b13
Parents: fdf6bd0
Author: Ferdinand Xu <ch...@intel.com>
Authored: Sun Sep 20 21:52:08 2015 -0400
Committer: Ferdinand Xu <ch...@intel.com>
Committed: Sun Sep 20 21:52:08 2015 -0400
----------------------------------------------------------------------
bin/beeline | 5 +++++
bin/ext/cli.sh | 9 +++++++++
2 files changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/dc9ca294/bin/beeline
----------------------------------------------------------------------
diff --git a/bin/beeline b/bin/beeline
index bceb7b9..6ca53b2 100644
--- a/bin/beeline
+++ b/bin/beeline
@@ -18,6 +18,11 @@
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
+# If process is backgrounded, don't change terminal settings
+if [[ ! $(ps -o stat= -p $$) == *+ ]]; then
+ export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
+fi
+
# Set Hadoop User classpath to true so that httpclient jars are taken from
# hive lib instead of hadoop lib.
export HADOOP_USER_CLASSPATH_FIRST=true
http://git-wip-us.apache.org/repos/asf/hive/blob/dc9ca294/bin/ext/cli.sh
----------------------------------------------------------------------
diff --git a/bin/ext/cli.sh b/bin/ext/cli.sh
index 96a69b0..893b7fc 100644
--- a/bin/ext/cli.sh
+++ b/bin/ext/cli.sh
@@ -16,6 +16,14 @@
THISSERVICE=cli
export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} "
+updateBeelineOpts() {
+ # If process is backgrounded, don't change terminal settings
+ if [[ ! $(ps -o stat= -p $$) == *+ ]]; then
+ echo "background"
+ export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
+ fi
+}
+
updateCli() {
if [ "$USE_DEPRECATED_CLI" == "true" ]; then
CLASS=org.apache.hadoop.hive.cli.CliDriver
@@ -24,6 +32,7 @@ updateCli() {
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configuration=beeline-log4j.properties"
CLASS=org.apache.hive.beeline.cli.HiveCli
JAR=hive-beeline-*.jar
+ updateBeelineOpts
fi
}