FAQ
Repository: hive
Updated Branches:
   refs/heads/branch-2.0 c293eca52 -> 2b16a1ee3
   refs/heads/master c37b0f581 -> ac6ba5031


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/ac6ba503
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ac6ba503
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ac6ba503

Branch: refs/heads/master
Commit: ac6ba50310d8c58761450cc5ad2545b75d4ce12f
Parents: c37b0f5
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:44:46 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/ac6ba503/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;
        }
      }

Search Discussions

  • Sershe at Dec 21, 2015 at 7:45 pm
    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;
            }
          }

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedDec 21, '15 at 7:45p
activeDec 21, '15 at 7:45p
posts2
users1
websitehive.apache.org

1 user in discussion

Sershe: 2 posts

People

Translate

site design / logo © 2021 Grokbase