Return-Path: X-Original-To: apmail-tez-commits-archive@minotaur.apache.org Delivered-To: apmail-tez-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 456C91762F for ; Wed, 18 Mar 2015 03:57:09 +0000 (UTC) Received: (qmail 45396 invoked by uid 500); 18 Mar 2015 03:57:09 -0000 Delivered-To: apmail-tez-commits-archive@tez.apache.org Received: (qmail 45357 invoked by uid 500); 18 Mar 2015 03:57:09 -0000 Mailing-List: contact commits-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list commits@tez.apache.org Received: (qmail 45348 invoked by uid 99); 18 Mar 2015 03:57:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2015 03:57:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DB31DE17F4; Wed, 18 Mar 2015 03:57:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jeagles@apache.org To: commits@tez.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: tez git commit: TEZ-2064. SessionNotRunning Exception not thrown is all cases (jeagles) Date: Wed, 18 Mar 2015 03:57:08 +0000 (UTC) Repository: tez Updated Branches: refs/heads/master 664747edf -> 9b845f296 TEZ-2064. SessionNotRunning Exception not thrown is all cases (jeagles) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/9b845f29 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/9b845f29 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/9b845f29 Branch: refs/heads/master Commit: 9b845f296d6e1ecd75d6953a5e00688acfe02849 Parents: 664747e Author: Jonathan Eagles Authored: Tue Mar 17 22:56:53 2015 -0500 Committer: Jonathan Eagles Committed: Tue Mar 17 22:56:53 2015 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + tez-api/src/main/java/org/apache/tez/client/TezClient.java | 5 +++++ tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java | 3 +++ 3 files changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/9b845f29/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index f6583c2..759504d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -86,6 +86,7 @@ Release 0.6.1: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-2064. SessionNotRunning Exception not thrown is all cases TEZ-2189. Tez UI live AM tracking url only works for localhost addresses TEZ-2179. Timeline relatedentries missing cause exaggerated warning. TEZ-2168. Fix application dependencies on mutually exclusive artifacts: tez-yarn-timeline-history http://git-wip-us.apache.org/repos/asf/tez/blob/9b845f29/tez-api/src/main/java/org/apache/tez/client/TezClient.java ---------------------------------------------------------------------- diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClient.java b/tez-api/src/main/java/org/apache/tez/client/TezClient.java index ab6e12d..d07793c 100644 --- a/tez-api/src/main/java/org/apache/tez/client/TezClient.java +++ b/tez-api/src/main/java/org/apache/tez/client/TezClient.java @@ -38,6 +38,7 @@ import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext; import org.apache.hadoop.yarn.api.records.LocalResource; import org.apache.hadoop.yarn.api.records.LocalResourceType; import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.tez.common.ReflectionUtils; import org.apache.tez.common.security.HistoryACLPolicyManager; @@ -491,6 +492,8 @@ public class TezClient { + ", applicationId=" + sessionAppId); try { frameworkClient.killApplication(sessionAppId); + } catch (ApplicationNotFoundException e) { + LOG.info("Failed to kill nonexistent application " + sessionAppId, e); } catch (YarnException e) { throw new TezException(e); } @@ -578,6 +581,8 @@ public class TezClient { LOG.info("Failed to retrieve AM Status via proxy", e); } } + } catch (ApplicationNotFoundException e) { + return TezAppMasterStatus.SHUTDOWN; } catch (YarnException e) { throw new TezException(e); } http://git-wip-us.apache.org/repos/asf/tez/blob/9b845f29/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java ---------------------------------------------------------------------- diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java index 69bc08e..2a29ce6 100644 --- a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java +++ b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java @@ -71,6 +71,7 @@ import org.apache.hadoop.yarn.api.records.LocalResourceVisibility; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier; import org.apache.hadoop.yarn.util.ConverterUtils; @@ -840,6 +841,8 @@ public class TezClientUtils { } return null; } + } catch (ApplicationNotFoundException e) { + throw new SessionNotRunning(e); } catch (YarnException e) { throw new TezException(e); }