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/28 03:10:48 UTC

[28/33] hive git commit: HIVE-10824: Need to update start script changes in .cmd files(Ferdinand Xu, reviewed by Xuefu Zhang)

HIVE-10824: Need to update start script changes in .cmd files(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/fdf6bd0b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fdf6bd0b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fdf6bd0b

Branch: refs/heads/master
Commit: fdf6bd0b5800db7649c91422aa4ece8f52be1245
Parents: 4a91efc
Author: Ferdinand Xu <ch...@intel.com>
Authored: Thu Sep 17 21:29:32 2015 -0400
Committer: Ferdinand Xu <ch...@intel.com>
Committed: Thu Sep 17 21:29:32 2015 -0400

----------------------------------------------------------------------
 bin/ext/cli.cmd | 35 ++++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/fdf6bd0b/bin/ext/cli.cmd
----------------------------------------------------------------------
diff --git a/bin/ext/cli.cmd b/bin/ext/cli.cmd
index 9e85691..3a96d03 100644
--- a/bin/ext/cli.cmd
+++ b/bin/ext/cli.cmd
@@ -14,20 +14,41 @@
 @rem See the License for the specific language governing permissions and
 @rem limitations under the License.
 
-set CLASS=org.apache.hadoop.hive.cli.CliDriver
-pushd %HIVE_LIB%
-for /f %%a IN ('dir /b hive-cli-*.jar') do (
-	set JAR=%HIVE_LIB%\%%a
-)
-popd
-
 if [%1]==[cli_help] goto :cli_help
 
 :cli
+	call :update_cli
 	call %HIVE_BIN_PATH%\ext\util\execHiveCmd.cmd %CLASS%
 goto :EOF
 
 :cli_help
+	call :update_cli
 	set HIVEARGS=--help
 	call :cli
 goto :EOF
+
+:update_cli
+	if /I "%USE_DEPRECATED_CLI%" == "true" (
+		call :old_cli
+	) else if (
+		call :new_cli
+	)
+goto :EOF
+
+:old_cli
+	set CLASS=org.apache.hadoop.hive.cli.CliDriver
+	pushd %HIVE_LIB%
+	for /f %%a IN ('dir /b hive-cli-*.jar') do (
+		set JAR=%HIVE_LIB%\%%a
+	)
+	popd
+goto :EOF
+
+:new_cli
+	set CLASS=org.apache.hive.beeline.cli.HiveCli
+	pushd %HIVE_LIB%
+	for /f %%a IN ('dir /b hive-beeline-*.jar') do (
+		set JAR=%HIVE_LIB%\%%a
+	)
+	popd
+goto :EOF
\ No newline at end of file