hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgumas...@apache.org
Subject svn commit: r1629716 - in /hive/trunk: bin/ext/hiveserver2.cmd bin/hive.cmd common/src/java/org/apache/hadoop/hive/conf/HiveConf.java ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
Date Mon, 06 Oct 2014 17:42:11 GMT
Author: vgumashta
Date: Mon Oct  6 17:42:10 2014
New Revision: 1629716

URL: http://svn.apache.org/r1629716
Log:
HIVE-8340: HiveServer2 service doesn't stop backend jvm process, which prevents follow-up
service start. (Xiaobing Zhou reviewed by Vaibhav Gumashta)

Modified:
    hive/trunk/bin/ext/hiveserver2.cmd
    hive/trunk/bin/hive.cmd
    hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java

Modified: hive/trunk/bin/ext/hiveserver2.cmd
URL: http://svn.apache.org/viewvc/hive/trunk/bin/ext/hiveserver2.cmd?rev=1629716&r1=1629715&r2=1629716&view=diff
==============================================================================
--- hive/trunk/bin/ext/hiveserver2.cmd (original)
+++ hive/trunk/bin/ext/hiveserver2.cmd Mon Oct  6 17:42:10 2014
@@ -59,8 +59,6 @@ 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"
 
@@ -78,21 +76,11 @@ goto :EOF
 @echo   ^<id^>HiveServer2^</id^>
 @echo   ^<name^>HiveServer2^</name^>
 @echo   ^<description^>Hadoop HiveServer2 Service^</description^>
-@echo   ^<executable^>%SystemRoot%\system32\cmd.exe^</executable^>
-@echo   ^<arguments^>/c %HIVE_BIN_PATH%\ext\hs2service.cmd ^</arguments^>
+@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.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
-hiveconf hive.metastore.uris=" " %HIVE_OPTS%^</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.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=1629716&r1=1629715&r2=1629716&view=diff
==============================================================================
--- hive/trunk/bin/hive.cmd (original)
+++ hive/trunk/bin/hive.cmd Mon Oct  6 17:42:10 2014
@@ -284,9 +284,6 @@ 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
 )

Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1629716&r1=1629715&r2=1629716&view=diff
==============================================================================
--- hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Mon Oct  6 17:42:10
2014
@@ -1721,8 +1721,10 @@ public class HiveConf extends Configurat
     HIVE_VECTORIZATION_GROUPBY_FLUSH_PERCENT("hive.vectorized.groupby.flush.percent", (float)
0.1,
         "Percent of entries in the group by aggregation hash flushed when the memory threshold
is exceeded."),
 
-
     HIVE_TYPE_CHECK_ON_INSERT("hive.typecheck.on.insert", true, ""),
+    HIVE_HADOOP_CLASSPATH("hive.hadoop.classpath", null,
+        "For Windows OS, we need to pass HIVE_HADOOP_CLASSPATH Java parameter while starting
HiveServer2 \n" +
+        "using \"-hiveconf hive.hadoop.classpath=%HIVE_LIB%\"."),
 
     HIVE_RPC_QUERY_PLAN("hive.rpc.query.plan", false,
         "Whether to send the query plan via local resource or RPC"),

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java?rev=1629716&r1=1629715&r2=1629716&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java Mon Oct
 6 17:42:10 2014
@@ -238,6 +238,18 @@ public class MapredLocalTask extends Tas
         variables.put(HADOOP_OPTS_KEY, hadoopOpts);
       }
 
+      //For Windows OS, we need to pass HIVE_HADOOP_CLASSPATH Java parameter while starting
+      //Hiveserver2 using "-hiveconf hive.hadoop.classpath=%HIVE_LIB%". This is to combine
path(s).
+      if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_HADOOP_CLASSPATH)!= null)
+      {
+        if (variables.containsKey("HADOOP_CLASSPATH"))
+        {
+          variables.put("HADOOP_CLASSPATH", variables.get("HADOOP_CLASSPATH") + ";" + HiveConf.getVar(conf,
HiveConf.ConfVars.HIVE_HADOOP_CLASSPATH));
+        } else {
+          variables.put("HADOOP_CLASSPATH", HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_HADOOP_CLASSPATH));
+        }
+      }
+
       if(variables.containsKey(MapRedTask.HIVE_DEBUG_RECURSIVE)) {
         MapRedTask.configureDebugVariablesForChildJVM(variables);
       }



Mime
View raw message