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 <[email protected]> Authored: Mon Dec 21 11:44:46 2015 -0800 Committer: Sergey Shelukhin <[email protected]> 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; } }
