You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/09/28 22:45:12 UTC

hive git commit: HIVE-11134 - HS2 should log open session failure (Thejas Nair via Vaibhav Gumashta)

Repository: hive
Updated Branches:
  refs/heads/master 1cf7e25c0 -> 392145812


HIVE-11134 - HS2 should log open session failure (Thejas Nair via Vaibhav Gumashta)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/master
Commit: 39214581297d4df20599a36afdcc84dca70caacb
Parents: 1cf7e25
Author: Thejas Nair <th...@hortonworks.com>
Authored: Sat Jun 27 07:04:40 2015 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Mon Sep 28 13:44:36 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hive/service/cli/session/SessionManager.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/39214581/service/src/java/org/apache/hive/service/cli/session/SessionManager.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/session/SessionManager.java b/service/src/java/org/apache/hive/service/cli/session/SessionManager.java
index 77c5e66..1119fd3 100644
--- a/service/src/java/org/apache/hive/service/cli/session/SessionManager.java
+++ b/service/src/java/org/apache/hive/service/cli/session/SessionManager.java
@@ -289,13 +289,14 @@ public class SessionManager extends CompositeService {
     try {
       session.open(sessionConf);
     } catch (Exception e) {
+      LOG.warn("Failed to open session", e);
       try {
         session.close();
       } catch (Throwable t) {
         LOG.warn("Error closing session", t);
       }
       session = null;
-      throw new HiveSQLException("Failed to open new session: " + e, e);
+      throw new HiveSQLException("Failed to open new session: " + e.getMessage(), e);
     }
     if (isOperationLogEnabled) {
       session.setOperationLogSessionDir(operationLogRootDir);
@@ -303,13 +304,14 @@ public class SessionManager extends CompositeService {
     try {
       executeSessionHooks(session);
     } catch (Exception e) {
+      LOG.warn("Failed to execute session hooks", e);
       try {
         session.close();
       } catch (Throwable t) {
         LOG.warn("Error closing session", t);
       }
       session = null;
-      throw new HiveSQLException("Failed to execute session hooks", e);
+      throw new HiveSQLException("Failed to execute session hooks: " + e.getMessage(), e);
     }
     handleToSession.put(session.getSessionHandle(), session);
     return session.getSessionHandle();