Repository: tez Updated Branches: refs/heads/branch-0.6 4e2aa2acc -> 7733923fe
TEZ-2064. SessionNotRunning Exception not thrown is all cases (jeagles) (cherry picked from commit 9b845f296d6e1ecd75d6953a5e00688acfe02849) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/7733923f Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/7733923f Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/7733923f Branch: refs/heads/branch-0.6 Commit: 7733923fef39689eb197b2af86681cd716f60ef4 Parents: 4e2aa2a Author: Jonathan Eagles <[email protected]> Authored: Tue Mar 17 22:56:53 2015 -0500 Committer: Jonathan Eagles <[email protected]> Committed: Tue Mar 17 22:57:51 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/7733923f/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index d594839..cbb0119 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,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/7733923f/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/7733923f/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 16e85d9..1713d97 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 @@ -70,6 +70,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); }
