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

Daniel Templeton edited comment on YARN-5761 at 11/17/16 2:48 PM:
------------------------------------------------------------------

Couple of comments:

* {{SchedulerQueueManager}} should have explanatory javadocs on all its methods.
* {{CapacitySchedulerQueueManager.queues}} should be final; use the diamond 
operator; and be called {{QUEUES}}.
* Missing javadoc in public constructor and many methods.
* Extra space in: {code}    root =  parseQueue(this.csContext, conf, null,{code}
* Should use diamond operator here: {code}    Map<String, CSQueue> newQueues = 
new HashMap<String, CSQueue>();{code}, here: {code}      List<CSQueue> 
childQueues = new ArrayList<CSQueue>();{code} and here: {code}    Map<String, 
Set<String>> queueToLabels = new HashMap<
        String, Set<String>>();{code}
* These two lines can be concatenated: {code}    String[] childQueueNames =
      conf.getQueues(fullQueueName);{code}
* {{throws}} has wrong indentation: {code}  private void validateExistingQueues(
      Map<String, CSQueue> queues, Map<String, CSQueue> newQueues)
  throws IOException {{code}
* {{addNewQueues()}} is missing descriptions for its params in javadoc.
* This {{@throws}} message is devoid of information: {{@throws YarnException in 
case of errors}}. In case of what kind of errors?





was (Author: templedf):
Couple of comments

* {{CapacitySchedulerQueueManager.queues}} should be final; use the diamond 
operator; and be called {{QUEUES}}.
* Missing javadoc in public constructor and methods
* Extra space in: {code}    root =  parseQueue(this.csContext, conf, null,{code}
* Should use diamond operator here: {code}    Map<String, CSQueue> newQueues = 
new HashMap<String, CSQueue>();{code}, here: {code}      List<CSQueue> 
childQueues = new ArrayList<CSQueue>();{code} and here: {code}    Map<String, 
Set<String>> queueToLabels = new HashMap<
        String, Set<String>>();{code}
* These two lines can be concatenated: {code}    String[] childQueueNames =
      conf.getQueues(fullQueueName);{code}
* {{throws}} has wrong indentation: {code}  private void validateExistingQueues(
      Map<String, CSQueue> queues, Map<String, CSQueue> newQueues)
  throws IOException {{code}
* {{addNewQueues()}} is missing descriptions for its params in javadoc.
* This {{@throws}} message is devoid of information: {{@throws YarnException in 
case of errors}}. In case of what kind of errors?




> Separate QueueManager from Scheduler
> ------------------------------------
>
>                 Key: YARN-5761
>                 URL: https://issues.apache.org/jira/browse/YARN-5761
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacityscheduler
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>              Labels: oct16-medium
>         Attachments: YARN-5761.1.patch, YARN-5761.1.rebase.patch, 
> YARN-5761.2.patch, YARN-5761.3.patch, YARN-5761.4.patch, YARN-5761.5.patch
>
>
> Currently, in scheduler code, we are doing queue manager and scheduling work. 
> We'd better separate the queue manager out of scheduler logic. In that case, 
> it would be much easier and safer to extend.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to