You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by px...@apache.org on 2015/09/27 08:05:36 UTC

[2/2] hive git commit: HIVE-9566: HiveServer2 fails to start with NullPointerException (Na via Xuefu)

HIVE-9566: HiveServer2 fails to start with NullPointerException (Na via Xuefu)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/37206a49
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/37206a49
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/37206a49

Branch: refs/heads/branch-1.0
Commit: 37206a49f1f6e12f3ac997bb04d3b383ae7781e1
Parents: 0b511ca
Author: Xuefu Zhang <xz...@Cloudera.com>
Authored: Tue Jun 30 05:15:40 2015 -0700
Committer: Pengcheng Xiong <px...@apache.org>
Committed: Sat Sep 26 22:04:13 2015 -0700

----------------------------------------------------------------------
 service/src/java/org/apache/hive/service/server/HiveServer2.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/37206a49/service/src/java/org/apache/hive/service/server/HiveServer2.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/server/HiveServer2.java b/service/src/java/org/apache/hive/service/server/HiveServer2.java
index 17e1d85..4f44987 100644
--- a/service/src/java/org/apache/hive/service/server/HiveServer2.java
+++ b/service/src/java/org/apache/hive/service/server/HiveServer2.java
@@ -267,7 +267,7 @@ public class HiveServer2 extends CompositeService {
     HiveConf hiveConf = this.getHiveConf();
     super.stop();
     // Remove this server instance from ZooKeeper if dynamic service discovery is set
-    if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY)) {
+    if (hiveConf != null && hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY)) {
       try {
         removeServerInstanceFromZooKeeper();
       } catch (Exception e) {
@@ -276,7 +276,7 @@ public class HiveServer2 extends CompositeService {
     }
     // There should already be an instance of the session pool manager.
     // If not, ignoring is fine while stopping HiveServer2.
-    if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_TEZ_INITIALIZE_DEFAULT_SESSIONS)) {
+    if (hiveConf != null && hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_TEZ_INITIALIZE_DEFAULT_SESSIONS)) {
       try {
         TezSessionPoolManager.getInstance().stop();
       } catch (Exception e) {