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

Sunil G commented on YARN-4164:
-------------------------------

Thanks [~rohithsharma] for updating the patch.

{code}
    Priority updateApplicationPriority =
        client.updateApplicationPriority(appId, newAppPriority);
    if (newAppPriority.equals(updateApplicationPriority)) {
      sysout.println("Successfully updated the application "
          + applicationId + " with priority '" + priority + "'");
    } else {
      sysout.println("Updated the application  " + applicationId
          + " to cluster max priority '" + updateApplicationPriority + "'");
    }
{code}

There is another corner case here when App is in its FINAL states. In that 
case, scheduler will not update the priority and last set priority is now 
returned. So this CLI handling will fall into else case and will print that 
{{"Updated the application to cluster max priority"}} which looks incorrect.

One possibility is that, we can look into cluster max priority here to print 
correct message. I am not very interested in banging RM again with a remote 
request to get cluster priority, so may be we can get cluster max priority also 
in response. Again this seems more information in response. OR simply we can 
print the message in else case as a general message which is common for both 
cases. Thoughts?


> Retrospect update ApplicationPriority API return type
> -----------------------------------------------------
>
>                 Key: YARN-4164
>                 URL: https://issues.apache.org/jira/browse/YARN-4164
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>         Attachments: 0001-YARN-4164.patch, 0002-YARN-4164.patch, 
> 0003-YARN-4164.patch
>
>
> Currently {{ApplicationClientProtocol#updateApplicationPriority()}} API 
> returns empty UpdateApplicationPriorityResponse response.
> But RM update priority to the cluster.max-priority if the given priority is 
> greater than cluster.max-priority. In this scenarios, need to intimate back 
> to client that updated  priority rather just keeping quite where client 
> assumes that given priority itself is taken.
> During application submission also has same scenario can happen, but I feel 
> when 
> explicitly invoke via ApplicationClientProtocol#updateApplicationPriority(), 
> response should have updated priority in response. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to