YARN-6992. Kill application button is visible even if the application is FINISHED in RM UI. Contributed by Suma Shivaprasad.
This commit is contained in:
parent
b6e7d13696
commit
6f101e7df1
|
@ -144,7 +144,8 @@ public class AppBlock extends HtmlBlock {
|
||||||
&& webUiType.equals(YarnWebParams.RM_WEB_UI)
|
&& webUiType.equals(YarnWebParams.RM_WEB_UI)
|
||||||
&& conf.getBoolean(YarnConfiguration.RM_WEBAPP_UI_ACTIONS_ENABLED,
|
&& conf.getBoolean(YarnConfiguration.RM_WEBAPP_UI_ACTIONS_ENABLED,
|
||||||
YarnConfiguration.DEFAULT_RM_WEBAPP_UI_ACTIONS_ENABLED)
|
YarnConfiguration.DEFAULT_RM_WEBAPP_UI_ACTIONS_ENABLED)
|
||||||
&& !unsecuredUIForSecuredCluster) {
|
&& !unsecuredUIForSecuredCluster
|
||||||
|
&& !isAppInFinalState(app)) {
|
||||||
// Application Kill
|
// Application Kill
|
||||||
html.div()
|
html.div()
|
||||||
.button()
|
.button()
|
||||||
|
@ -419,4 +420,10 @@ public class AppBlock extends HtmlBlock {
|
||||||
}
|
}
|
||||||
return ret;
|
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