You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/09/22 03:04:37 UTC
svn commit: r1626655 - in /hive/trunk/bin: beeline.cmd ext/beeline.sh
Author: hashutosh
Date: Mon Sep 22 01:04:37 2014
New Revision: 1626655
URL: http://svn.apache.org/r1626655
Log:
HIVE-8200 : Make beeline use the hive-jdbc standalone jar (Deepesh Khandelwal via Ashutosh Chauhan)
Modified:
hive/trunk/bin/beeline.cmd
hive/trunk/bin/ext/beeline.sh
Modified: hive/trunk/bin/beeline.cmd
URL: http://svn.apache.org/viewvc/hive/trunk/bin/beeline.cmd?rev=1626655&r1=1626654&r2=1626655&view=diff
==============================================================================
--- hive/trunk/bin/beeline.cmd (original)
+++ hive/trunk/bin/beeline.cmd Mon Sep 22 01:04:37 2014
@@ -43,7 +43,22 @@ if not exist %HADOOP_HOME%\libexec\hadoo
@rem supress the HADOOP_HOME warnings in 1.x.x
set HADOOP_HOME_WARN_SUPPRESS=true
call %HADOOP_HOME%\libexec\hadoop-config.cmd
-set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\*;
+
+@rem include only the beeline client jar and its dependencies
+pushd %HIVE_HOME%\lib
+for /f %%a IN ('dir /b hive-beeline-**.jar') do (
+ set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\%%a
+)
+for /f %%a IN ('dir /b super-csv-**.jar') do (
+ set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\%%a
+)
+for /f %%a IN ('dir /b jline-**.jar') do (
+ set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\%%a
+)
+for /f %%a IN ('dir /b hive-jdbc-**-standalone.jar') do (
+ set CLASSPATH=%CLASSPATH%;%HIVE_HOME%\lib\%%a
+)
+popd
call %JAVA_HOME%\bin\java %JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH% org.apache.hive.beeline.BeeLine %*
Modified: hive/trunk/bin/ext/beeline.sh
URL: http://svn.apache.org/viewvc/hive/trunk/bin/ext/beeline.sh?rev=1626655&r1=1626654&r2=1626655&view=diff
==============================================================================
--- hive/trunk/bin/ext/beeline.sh (original)
+++ hive/trunk/bin/ext/beeline.sh Mon Sep 22 01:04:37 2014
@@ -19,11 +19,17 @@ export SERVICE_LIST="${SERVICE_LIST}${TH
beeline () {
CLASS=org.apache.hive.beeline.BeeLine;
- execHiveCmd $CLASS "$@"
+
+ # include only the beeline client jar and its dependencies
+ beelineJarPath=`ls ${HIVE_LIB}/hive-beeline-*.jar`
+ superCsvJarPath=`ls ${HIVE_LIB}/super-csv-*.jar`
+ jlineJarPath=`ls ${HIVE_LIB}/jline-*.jar`
+ jdbcStandaloneJarPath=`ls ${HIVE_LIB}/hive-jdbc-*-standalone.jar`
+ export HADOOP_CLASSPATH=${beelineJarPath}:${superCsvJarPath}:${jlineJarPath}:${jdbcStandaloneJarPath}
+
+ exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@"
}
beeline_help () {
- CLASS=org.apache.hive.beeline.BeeLine;
- execHiveCmd $CLASS "--help"
+ beeline "--help"
}
-