ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-7962. Slider View: It is not possible to destroy storm app with KILLED status (srimanth)
Date Fri, 24 Oct 2014 20:18:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1e7607b89 -> 54989df2a


AMBARI-7962. Slider View: It is not possible to destroy storm app with KILLED status (srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54989df2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54989df2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54989df2

Branch: refs/heads/trunk
Commit: 54989df2a8a83f3108a6b94b8a4a0c2dc783edf3
Parents: 1e7607b
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Fri Oct 24 13:03:48 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Fri Oct 24 13:17:56 2014 -0700

----------------------------------------------------------------------
 .../view/slider/SliderAppsViewControllerImpl.java   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/54989df2/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index d8e07df..d9e2a9d 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -569,6 +569,22 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
         return null;
       }
     }
+    if (YarnApplicationState.KILLED.equals(yarnApp.getYarnApplicationState())) {
+      try {
+        if (sliderClient.actionExists(yarnApp.getName(), false) != LauncherExitCodes.EXIT_SUCCESS)
{
+          // YARN application is killed, and no HDFS content - Application has been destroyed.
+          return null;
+        }
+      } catch (UnknownApplicationInstanceException e) {
+        return null; // Application not in HDFS - means it is not frozen
+      } catch (YarnException e) {
+        logger.warn("Unable to determine status of killed app " + yarnApp.getName(), e);
+        return null;
+      } catch (IOException e) {
+        logger.warn("Unable to determine status of killed app " + yarnApp.getName(), e);
+        return null;
+      }
+    }
 
     app.setId(getApplicationIdString(yarnApp.getApplicationId()));
     app.setName(yarnApp.getName());


Mime
View raw message