Skip to content

Commit

Permalink
HIVE-15710: HS2 Stopped when running in background (Rui reviewed by F…
Browse files Browse the repository at this point in the history
…erdinand, Xuefu and Mohit)
  • Loading branch information
lirui-apache authored and Rui Li committed Feb 17, 2017
1 parent ef61a9b commit 90688bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
5 changes: 0 additions & 5 deletions bin/beeline
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`

# If process is backgrounded, don't change terminal settings
if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
fi

. "$bin"/hive --service beeline "$@"
8 changes: 0 additions & 8 deletions bin/ext/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ if [ -z "$USE_DEPRECATED_CLI" ] || [ "$USE_DEPRECATED_CLI" != "false" ]; then
USE_DEPRECATED_CLI="true"
fi

updateBeelineOpts() {
# If process is backgrounded, don't change terminal settings
if [[ ( ! $(ps -o stat= -p $$) =~ *+ ) && ! ( -p /dev/stdin ) ]]; then
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
Expand All @@ -37,7 +30,6 @@ updateCli() {
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=beeline-log4j2.properties"
CLASS=org.apache.hive.beeline.cli.HiveCli
JAR=hive-beeline-*.jar
updateBeelineOpts
fi
}

Expand Down
7 changes: 7 additions & 0 deletions bin/hive
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ else
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.properties -Djava.util.logging.config.file=$bin/../conf/parquet-logging.properties "
fi

if [[ "$SERVICE" =~ ^(hiveserver2|beeline|cli)$ ]] ; then
# If process is backgrounded, don't change terminal settings
if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djline.terminal=jline.UnsupportedTerminal"
fi
fi

if [ "$TORUN" = "" ] ; then
echo "Service $SERVICE not found"
echo "Available Services: $SERVICE_LIST"
Expand Down

0 comments on commit 90688bd

Please sign in to comment.