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

Sunil G commented on MAPREDUCE-5870:
------------------------------------

HI [~eepayne]
In Job class, we have an api called {{setJobPriority}} and it invokes 
setJobPriority api in ClientProtocol if job is running. And this api is dummy 
for now.
Job.java
{code}
      ensureState(JobState.RUNNING);
      final JobPriority tmpPriority = priority;
      ugi.doAs(new PrivilegedExceptionAction<Object>() {
        @Override
        public Object run() throws IOException, InterruptedException {
          cluster.getClient().setJobPriority(getJobID(), 
tmpPriority.toString());
          return null;
        }
      });
{code}
ResourceMgDelegate.java
{code}
  public void setJobPriority(JobID arg0, String arg1) throws IOException,
      InterruptedException {
    return;
  }
{code}
YARN-4014 introduces new api in {{ClientProtocol}} to set priority of an 
application at runtime. So we can use that api instead of current dummy one.

Existing cli is {{mapred -set-priority <values>}} 

> Support for passing Job priority through Application Submission Context in 
> Mapreduce Side
> -----------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5870
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5870
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: client
>            Reporter: Sunil G
>            Assignee: Sunil G
>         Attachments: 0001-MAPREDUCE-5870.patch, 0002-MAPREDUCE-5870.patch, 
> 0003-MAPREDUCE-5870.patch, Yarn-2002.1.patch
>
>
> Job Prioirty can be set from client side as below [Configuration and api].
>                       a.      JobConf.getJobPriority() and 
> Job.setPriority(JobPriority priority) 
>                       b.      We can also use configuration 
> "mapreduce.job.priority".
>               Now this Job priority can be passed in Application Submission 
> context from Client side.
>               Here we can reuse the MRJobConfig.PRIORITY configuration. 



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

Reply via email to