You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vg...@apache.org on 2014/05/05 21:44:22 UTC

svn commit: r1592622 - in /hive/trunk/bin: ext/hiveserver2.cmd hive.cmd

Author: vgumashta
Date: Mon May  5 19:44:22 2014
New Revision: 1592622

URL: http://svn.apache.org/r1592622
Log:
HIVE-5092: Fix hiveserver2 mapreduce local job on Windows (Hari Sankar Sivarama Subramaniyan via Vaibhav Gumashta)

Modified:
    hive/trunk/bin/ext/hiveserver2.cmd
    hive/trunk/bin/hive.cmd

Modified: hive/trunk/bin/ext/hiveserver2.cmd
URL: http://svn.apache.org/viewvc/hive/trunk/bin/ext/hiveserver2.cmd?rev=1592622&r1=1592621&r2=1592622&view=diff
==============================================================================
--- hive/trunk/bin/ext/hiveserver2.cmd (original)
+++ hive/trunk/bin/ext/hiveserver2.cmd Mon May  5 19:44:22 2014
@@ -59,6 +59,8 @@ if [%1]==[hiveserver2_help] goto :hivese
 
 if [%1]==[hiveserver2_catservice] goto :hiveserver2_catservice
 
+if [%1]==[hiveserver2_catcmd] goto :hiveserver2_catcmd
+
 :hiveserver2
   echo "Starting Hive Thrift Server"
 
@@ -76,11 +78,21 @@ goto :EOF
 @echo   ^<id^>HiveServer2^</id^>
 @echo   ^<name^>HiveServer2^</name^>
 @echo   ^<description^>Hadoop HiveServer2 Service^</description^>
-@echo   ^<executable^>%JAVA_HOME%\bin\java^</executable^>
-@echo   ^<arguments^>%JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH%;%HIVE_HBASE_PATH% %CLASS% -hiveconf hive.hadoop.classpath=%HIVE_LIB%\* -hiveconf hive.metastore.uris=" " -hiveconf hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator  %HIVE_OPTS%^</arguments^>
+@echo   ^<executable^>%SystemRoot%\system32\cmd.exe^</executable^>
+@echo   ^<arguments^>/c %HIVE_BIN_PATH%\ext\hs2service.cmd ^</arguments^>
 @echo ^</service^>
 goto :EOF
 
+
+:hiveserver2_catcmd
+if not defined HADOOP_CLASSPATH (
+  @echo set HADOOP_CLASSPATH=%HIVE_LIB%\*
+  ) else (
+  @echo set HADOOP_CLASSPATH=%HADOOP_CLASSPATH%;%HIVE_LIB%\*
+  )
+@echo %JAVA_HOME%\bin\java %JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH%;%HIVE_HBASE_PATH% %CLASS% -hiveconf hive.hadoop.classpath=%HIVE_LIB%\* -hiveconf hive.metastore.uris=" " -hiveconf hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator  %HIVE_OPTS%
+goto :EOF
+
 :AddToHiveHbasePath
 if not defined HIVE_HBASE_PATH (
    set HIVE_HBASE_PATH=%1

Modified: hive/trunk/bin/hive.cmd
URL: http://svn.apache.org/viewvc/hive/trunk/bin/hive.cmd?rev=1592622&r1=1592621&r2=1592622&view=diff
==============================================================================
--- hive/trunk/bin/hive.cmd (original)
+++ hive/trunk/bin/hive.cmd Mon May  5 19:44:22 2014
@@ -263,6 +263,9 @@ if defined CATSERVICE (
 	) else (
 	  call %HADOOP_HOME%\libexec\hadoop-config.cmd
 	)
+  if %TORUN% == hiveserver2 (
+        call %HIVE_BIN_PATH%\ext\hiveserver2.cmd hiveserver2_catcmd > %HIVE_BIN_PATH%\ext\hs2service.cmd
+  )  
 	call %HIVE_BIN_PATH%\ext\%TORUN%.cmd %TORUN%%CATSERVICE% %*
 	goto :EOF
 )