hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Shahid Khan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4441) Kill application request from the webservice(ui) is showing success even for the finished applications
Date Fri, 11 Dec 2015 06:22:10 GMT

    [ https://issues.apache.org/jira/browse/YARN-4441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052256#comment-15052256
] 

Mohammad Shahid Khan commented on YARN-4441:
--------------------------------------------

If an application is already finished, then the killing the application does does not make
any sense.
>From UI we can call the kill operation and that event is logged as below.
And in the audit log we are getting the success message for the operation Kill Application
Request is successful.

in the below code the problem is there at the first if check. 
Suppose application_xyz is already finished and when the kill request will come the target
state will be KILLED and actual will be finished, the first if check will be true. 
Second if check also will be true as the target is KILLED and killApp method will be called
and same will log the 
 USER=dr.who	OPERATION=Kill Application Request	TARGET=ClientRMService	RESULT=SUCCESS	APPID=application_xyz
 | RMAuditLogger.java:91
 USER=dr.who	OPERATION=Kill Application Request	TARGET=RMWebService	RESULT=SUCCESS	APPID=application_xyz
 | MAuditLogger.java:91

{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}

I think we should not allow to call the killApp if the application is already finished.

> 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)

Mime
View raw message