YARN-6992. Kill application button is visible even if the application is FINISHED in RM UI. Contributed by Suma Shivaprasad.
(cherry picked from commit 6f101e7df1
)
This commit is contained in:
parent
8ff2523687
commit
f3c9b2e40e
|
@ -144,7 +144,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()
|
||||
|
@ -419,4 +420,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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue