Repository: hive Updated Branches: refs/heads/master b101af1d0 -> 896f10dba
HIVE-20734 : Beeline: When beeline-site.xml is and hive CLI redirects to beeline, it should use the system username/dummy password instead of prompting for one Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/896f10db Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/896f10db Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/896f10db Branch: refs/heads/master Commit: 896f10dba1e780110339dbded9df66dd0652004a Parents: b101af1 Author: Mahesh Kumar Behera <[email protected]> Authored: Tue Dec 11 11:46:23 2018 -0700 Committer: Thejas M Nair <[email protected]> Committed: Tue Dec 11 11:46:23 2018 -0700 ---------------------------------------------------------------------- bin/ext/beeline.sh | 6 +++++- bin/hive | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/896f10db/bin/ext/beeline.sh ---------------------------------------------------------------------- diff --git a/bin/ext/beeline.sh b/bin/ext/beeline.sh index 8052c45..96f8f60 100644 --- a/bin/ext/beeline.sh +++ b/bin/ext/beeline.sh @@ -32,7 +32,11 @@ beeline () { export HADOOP_CLASSPATH="${hadoopClasspath}${HIVE_CONF_DIR}:${beelineJarPath}:${superCsvJarPath}:${jlineJarPath}" export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=beeline-log4j2.properties " - exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@" + if [ -z $CLIUSER ] ; then + exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@" + else + exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@" -n "${CLIUSER}" -p "${CLIUSER}" + fi } beeline_help () { http://git-wip-us.apache.org/repos/asf/hive/blob/896f10db/bin/hive ---------------------------------------------------------------------- diff --git a/bin/hive b/bin/hive index a7ae2f5..ef9ef95 100755 --- a/bin/hive +++ b/bin/hive @@ -86,6 +86,7 @@ if [ "$SERVICE" = "" ] ; then fi if [[ "$SERVICE" == "cli" && "$USE_BEELINE_FOR_HIVE_CLI" == "true" ]] ; then + CLIUSER=`whoami` SERVICE="beeline" fi
