Index: bin/ext/hiveserver2.cmd =================================================================== --- bin/ext/hiveserver2.cmd (revision 1591751) +++ bin/ext/hiveserver2.cmd (working copy) @@ -59,6 +59,8 @@ if [%1]==[hiveserver2_catservice] goto :hiveserver2_catservice +if [%1]==[hiveserver2_catcmd] goto :hiveserver2_catcmd + :hiveserver2 echo "Starting Hive Thrift Server" @@ -76,11 +78,21 @@ @echo ^HiveServer2^ @echo ^HiveServer2^ @echo ^Hadoop HiveServer2 Service^ -@echo ^%JAVA_HOME%\bin\java^ -@echo ^%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%^ +@echo ^%SystemRoot%\system32\cmd.exe^ +@echo ^/c %HIVE_BIN_PATH%\ext\hs2service.cmd ^ @echo ^ 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 Index: bin/hive.cmd =================================================================== --- bin/hive.cmd (revision 1591751) +++ bin/hive.cmd (working copy) @@ -263,6 +263,9 @@ ) 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 )