hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [2/2] hive git commit: HIVE-12710 : add better logging for Tez session creation thread failures (Sergey Shelukhin, reviewed by Siddharth Seth)
Date Mon, 21 Dec 2015 19:45:25 GMT
HIVE-12710 : add better logging for Tez session creation thread failures (Sergey Shelukhin,
reviewed by Siddharth Seth)


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

Branch: refs/heads/branch-2.0
Commit: 2b16a1ee3e11b994ccaf79ccd1a97c86fc3e859a
Parents: c293eca
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Mon Dec 21 11:44:46 2015 -0800
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Mon Dec 21 11:45:02 2015 -0800

----------------------------------------------------------------------
 .../hadoop/hive/ql/exec/tez/TezSessionState.java      | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/2b16a1ee/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
index e1a8041..e5df2ec 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
@@ -315,7 +315,12 @@ public class TezSessionState {
       FutureTask<TezClient> sessionFuture = new FutureTask<>(new Callable<TezClient>()
{
         @Override
         public TezClient call() throws Exception {
-          return startSessionAndContainers(session, conf, commonLocalResources, tezConfig,
true);
+          try {
+            return startSessionAndContainers(session, conf, commonLocalResources, tezConfig,
true);
+          } catch (Throwable t) {
+            LOG.error("Failed to start Tez session", t);
+            throw (t instanceof Exception) ? (Exception)t : new Exception(t);
+          }
         }
       });
       new Thread(sessionFuture, "Tez session start thread").start();
@@ -341,9 +346,7 @@ public class TezSessionState {
           session.preWarm(prewarmVertex);
         } catch (IOException ie) {
           if (!isOnThread && ie.getMessage().contains("Interrupted while waiting"))
{
-            if (LOG.isDebugEnabled()) {
-              LOG.debug("Hive Prewarm threw an exception ", ie);
-            }
+            LOG.warn("Hive Prewarm threw an exception ", ie);
           } else {
             throw ie;
           }
@@ -483,11 +486,14 @@ public class TezSessionState {
       try {
         session = sessionFuture.get();
       } catch (InterruptedException e) {
+        console.printInfo("Interrupted while waiting for the session");
         Thread.currentThread().interrupt();
         return null;
       } catch (ExecutionException e) {
+        console.printInfo("Failed to get session");
         throw new RuntimeException(e);
       } catch (CancellationException e) {
+        console.printInfo("Cancelled while waiting for the session");
         return null;
       }
     }


Mime
View raw message