[
https://issues.apache.org/jira/browse/YARN-4441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055504#comment-15055504
]
Mohammad Shahid Khan commented on YARN-4441:
--------------------------------------------
Thanks [#Sunil G] and [#Rohith Sharma K S] for the analysis.
Have discussed the same with [#Rohith Sharma K S] and want to clarify that
we do not want to throw the new exception just want the avoid the killApp call
in case the application's state is already stored in the app store.
In RMWebServices updateAppState API
//currentlty we are ignoring the killAPP call for the application which are
already killed.
{code}
if (!app.getState().toString().equals(targetState.getState())) {
// user is attempting to change state. right we only
// allow users to kill the app
if
(targetState.getState().equals(YarnApplicationState.KILLED.toString())) {
return killApp(app, callerUGI, hsr);
}
throw new BadRequestException("Only '"
+ YarnApplicationState.KILLED.toString()
+ "' is allowed as a target state.");
}
{code}
#My proposal is to ignore the call also for the applications whose state's are
stored to the application store.
{code}
if (!app.getState().toString().equals(targetState.getState()) &&
!(app.isAppFinalStateStored())) {
// user is attempting to change state. right we only
// allow users to kill the app
if
(targetState.getState().equals(YarnApplicationState.KILLED.toString())) {
return killApp(app, callerUGI, hsr);
}
throw new BadRequestException("Only '"
+ YarnApplicationState.KILLED.toString()
+ "' is allowed as a target state.");
}
{code}
> Kill application request from the webservice(ui) is showing success even for
> the finished applications
> ------------------------------------------------------------------------------------------------------
>
> Key: YARN-4441
> URL: https://issues.apache.org/jira/browse/YARN-4441
> Project: Hadoop YARN
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Mohammad Shahid Khan
> Assignee: Mohammad Shahid Khan
>
> If the application is already finished ie either failled, killed, or succeded
> the kill operation should not be logged as success.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)