Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6E244200CF0 for ; Thu, 7 Sep 2017 09:53:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6CC10161536; Thu, 7 Sep 2017 07:53:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B48BD160EC9 for ; Thu, 7 Sep 2017 09:53:46 +0200 (CEST) Received: (qmail 89225 invoked by uid 500); 7 Sep 2017 07:53:45 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 89216 invoked by uid 99); 7 Sep 2017 07:53:45 -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; Thu, 07 Sep 2017 07:53:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8612EF55A7; Thu, 7 Sep 2017 07:53:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sunilg@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: YARN-6992. Kill application button is visible even if the application is FINISHED in RM UI. Contributed by Suma Shivaprasad. Date: Thu, 7 Sep 2017 07:53:45 +0000 (UTC) archived-at: Thu, 07 Sep 2017 07:53:47 -0000 Repository: hadoop Updated Branches: refs/heads/branch-2 5ccdd8392 -> 8cce19241 YARN-6992. Kill application button is visible even if the application is FINISHED in RM UI. Contributed by Suma Shivaprasad. (cherry picked from commit 6f101e7df10d477cf7469f6979d0cb8269315a3e) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8cce1924 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8cce1924 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8cce1924 Branch: refs/heads/branch-2 Commit: 8cce19241e781edc2019521060b15f976f04ca84 Parents: 5ccdd83 Author: Sunil G Authored: Thu Sep 7 13:16:20 2017 +0530 Committer: Sunil G Committed: Thu Sep 7 13:18:30 2017 +0530 ---------------------------------------------------------------------- .../java/org/apache/hadoop/yarn/server/webapp/AppBlock.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8cce1924/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java index 79b0262..603b0d0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java @@ -143,7 +143,8 @@ public class AppBlock extends HtmlBlock { && webUiType.equals(YarnWebParams.RM_WEB_UI) && conf.getBoolean(YarnConfiguration.RM_WEBAPP_UI_ACTIONS_ENABLED, YarnConfiguration.DEFAULT_RM_WEBAPP_UI_ACTIONS_ENABLED) - && !unsecuredUIForSecuredCluster) { + && !unsecuredUIForSecuredCluster + && !isAppInFinalState(app)) { // Application Kill html.div() .button() @@ -410,4 +411,10 @@ public class AppBlock extends HtmlBlock { } return ret; } + + private boolean isAppInFinalState(AppInfo app) { + return app.getAppState() == YarnApplicationState.FINISHED + || app.getAppState() == YarnApplicationState.FAILED + || app.getAppState() == YarnApplicationState.KILLED; + } } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org