Repository: hive Updated Branches: refs/heads/beeline-cli 185795696 -> 046c5ebdb
HIVE-11943: Set old CLI as the default Client when using hive script(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/046c5ebd Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/046c5ebd Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/046c5ebd Branch: refs/heads/beeline-cli Commit: 046c5ebdbeaa8155189db13f78ddb28c63c7500c Parents: 1857956 Author: Ferdinand Xu <[email protected]> Authored: Thu Sep 24 21:14:33 2015 -0400 Committer: Ferdinand Xu <[email protected]> Committed: Thu Sep 24 21:14:33 2015 -0400 ---------------------------------------------------------------------- bin/ext/cli.cmd | 6 +++++- bin/ext/cli.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/046c5ebd/bin/ext/cli.cmd ---------------------------------------------------------------------- diff --git a/bin/ext/cli.cmd b/bin/ext/cli.cmd index 3a96d03..d9185c0 100644 --- a/bin/ext/cli.cmd +++ b/bin/ext/cli.cmd @@ -28,9 +28,13 @@ goto :EOF goto :EOF :update_cli + if [%USE_DEPRECATED_CLI%] == [] ( + set USE_DEPRECATED_CLI=false + ) + if /I "%USE_DEPRECATED_CLI%" == "true" ( call :old_cli - ) else if ( + ) else ( call :new_cli ) goto :EOF http://git-wip-us.apache.org/repos/asf/hive/blob/046c5ebd/bin/ext/cli.sh ---------------------------------------------------------------------- diff --git a/bin/ext/cli.sh b/bin/ext/cli.sh index 893b7fc..e7897b3 100644 --- a/bin/ext/cli.sh +++ b/bin/ext/cli.sh @@ -16,10 +16,14 @@ THISSERVICE=cli export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} " +# Set old CLI as the default client +if [ -n '$USE_DEPRECATED_CLI' ]; then + USE_DEPRECATED_CLI="true" +fi + 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 }
