hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wanqiang Ji (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-9214) Add AbstractYarnScheduler#getValidQueues method to resolve duplicate code
Date Sat, 02 Mar 2019 00:21:00 GMT

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

Wanqiang Ji edited comment on YARN-9214 at 3/2/19 12:20 AM:
------------------------------------------------------------

Hi, [~cheersyang], [~eepayne], [~Prabhu Joseph]

Due to different scheduler implements *getAppsInQueue* with different logic, so we need to
check whether the queue is valid. In *AbstractYarnScheduler* we had two methods do it, so
I think we should call the another method to do it. In addition to that, I think it is a
good practice to reduce the duplicate code.  So I created this issue and resolved it.

Can you help to review this?


was (Author: jiwq):
Hi, [~cheersyang], [~eepayne], [~Prabhu Joseph]

Due to different scheduler implements *getAppsInQueue* with different logic, so we need to
check whether the queue is valid. In *AbstractYarnScheduler* we had two method do it, so I
think we should call the another method to do it. In addition to that, I think it is a good
practice to reduce the duplicate code.  So I created this issue and resolved it.

Can you help to review this?

> Add AbstractYarnScheduler#getValidQueues method to resolve duplicate code 
> --------------------------------------------------------------------------
>
>                 Key: YARN-9214
>                 URL: https://issues.apache.org/jira/browse/YARN-9214
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 3.1.0, 3.2.0, 2.9.2, 3.0.3, 2.8.5
>            Reporter: Wanqiang Ji
>            Assignee: Wanqiang Ji
>            Priority: Major
>             Fix For: 3.3.0
>
>         Attachments: YARN-9214.001.patch
>
>
> *AbstractYarnScheduler#moveAllApps* and *AbstractYarnScheduler#killAllAppsInQueue* had
the same code segment. So I think we need a method to handle it named *AbstractYarnScheduler#getValidQueues*.
Apart from this we need add the doc comment to expound why exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message