[ https://issues.apache.org/jira/browse/YARN-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Naganarasimha G R updated YARN-3970: ------------------------------------ Attachment: YARN-3970.20150829-1.patch Thanks [~sunilg] for the review comments, bq. priority.getPriority() != targetPriority.getPriority() We could use !priority.equals(targetPriority) targetPriority is of type "org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppPriority" and priority is of type "org.apache.hadoop.yarn.api.records.Priority". so it cannot be compared as per your suggestion. bq. If app.getApplicationSubmissionContext().getPriority() is NULL, we will get n NPE here. Well went through the flow again, i think i have got the if clause wrong here, what i am trying to check here is, if target priority is same as the current priority then just return as success, so i can just return back with the target priority. Also i think i need to additionally validate whether target priority is not null. So after correction of all this, NPE is not possible here but other checks i will be adding as follows {code} if (targetPriority == null) { throw new YarnException("Target Priority cannot be null"); } . . . Priority priority = app.getApplicationSubmissionContext().getPriority(); if (priority == null || priority.getPriority() != targetPriority.getPriority()) { return modifyApplicationPriority(app, callerUGI, targetPriority.getPriority()); } return Response.status(Status.OK).entity(targetPriority).build(); {code} > REST api support for Application Priority > ----------------------------------------- > > Key: YARN-3970 > URL: https://issues.apache.org/jira/browse/YARN-3970 > Project: Hadoop YARN > Issue Type: Sub-task > Components: webapp > Affects Versions: 2.7.1 > Reporter: Sunil G > Assignee: Naganarasimha G R > Attachments: YARN-3970.20150828-1.patch, YARN-3970.20150829-1.patch > > > REST api support for application priority. > - get/set priority of an application > - get default priority of a queue > - get cluster max priority -- This message was sent by Atlassian JIRA (v6.3.4#6332)