hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Payne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2896) Server side PB changes for Priority Label Manager and Admin CLI support
Date Tue, 20 Jan 2015 21:21:36 GMT

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

Eric Payne commented on YARN-2896:
----------------------------------

Thanks, [~sunilg], for working on this feature and posting this patch to support PB framework.

I have a general question about why job priorities need labels. Why can't they just be number
based? It seems like extra work to label them, pass the labels, and then interpret them.

----

{{PriorityLabelsPerQueue.java}}:
{code}
  public String toString() {
    return "Max priority label: " + this.getMaxPriorityLabel() + " ,"
        + "Default priority label: " + this.getDefaultPriorityLabel();
  }
{code}
This is just a nit, but in {{PriorityLabelsPerQueue#toString}}, the space should be after
the comma. Currently, this will output something like this:
{code}
    Max priority label: foo ,Default priority label: bar
{code}


{code}
  public int compareTo(PriorityLabelsPerQueue priorityLabelsPerQueue) {
    int defltLabelCompare = this.getDefaultPriorityLabel().compareTo(
        priorityLabelsPerQueue.getDefaultPriorityLabel());
    if (defltLabelCompare == 0) {
      return this.getMaxPriorityLabel().compareTo(
          priorityLabelsPerQueue.getMaxPriorityLabel());
    } else {
      return defltLabelCompare;
    }
  }
{code}
{{PriorityLabelsPerQueue#compareTo}} should probably check for NULL for {{priorityLabelsPerQueue}},
{{this.getDefaultPriorityLabel()}}, and {{this.getMaxPriorityLabel()}}.  If {{priorityLabelsPerQueue}}
is NULL, {{this.getDefaultPriorityLabel()}} returns NULL, or {{this.getMaxPriorityLabel()}}
returns NULL, {{compareTo}} will throw NPE.

----

{{yarn_protos.proto}}:
{code}
message ApplicationPriorityProto {
  optional string app_priority = 1;
}
{code}
Where is this referenced?


> Server side PB changes for Priority Label Manager and Admin CLI support
> -----------------------------------------------------------------------
>
>                 Key: YARN-2896
>                 URL: https://issues.apache.org/jira/browse/YARN-2896
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api, resourcemanager
>            Reporter: Sunil G
>            Assignee: Sunil G
>         Attachments: 0001-YARN-2896.patch, 0002-YARN-2896.patch, 0003-YARN-2896.patch,
0004-YARN-2896.patch
>
>
> Common changes:
>  * PB support changes required for Admin APIs 
>  * PB support for File System store (Priority Label Store)



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

Mime
View raw message