[
https://issues.apache.org/jira/browse/MAPREDUCE-5870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642080#comment-14642080
]
Jian He commented on MAPREDUCE-5870:
------------------------------------
[~sunilg], thanks for updating,
- should we use the JobConf.getJobPriority API so that it can accept the
current CLI specified priority too ?
{code}
String jobPriority = jobConf.get(MRJobConfig.PRIORITY);
{code}
- to simplify a little bit,
{code}
int iPriority = TypeConverter.toYarn(jobPriority);
// If the given input not a JobPriority enum, verify whether its an
// integer.
if (0 == iPriority) {
iPriority = Integer.parseInt(jobPriority);
}
{code}
we can do something like
{code}
try {
iPriority = TypeConverter.toYarn(jobPriority);
} catch (IllegalArgumentException exception) {
iPriority = Integer.parseInt(jobPriority);
}
{code}
> 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,
> 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)