tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject tez git commit: TEZ-2064. SessionNotRunning Exception not thrown is all cases (jeagles)
Date Wed, 18 Mar 2015 03:57:08 GMT
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 <jeagles@gmail.com>
Authored: Tue Mar 17 22:56:53 2015 -0500
Committer: Jonathan Eagles <jeagles@gmail.com>
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);
     }


Mime
View raw message