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

Ray Chiang commented on YARN-5283:
----------------------------------

[~subru], sanity checks like {{isReadyToAssignContainers}} are bad for 
subclassing in the sense that you can't force the method to return without 
creating a subclass-only method that only 
{{AbstractYarnScheduler::assignContainers}} calls.  That's why I moved the 
{{isReadyToAssignContainers}} check outside {{assignContainers}} for all the 
subclasses.  That being said, if a 
{{assignContainers}}/{{assignContainersInternal}} approach is preferred, I'm 
okay with that.

There weren't any nice refactorings I could see within {{assignContainers}} at 
first glance, but I'll take a deeper look when I can.

> Refactor container assignment into AbstractYarnScheduler#assignContainers
> -------------------------------------------------------------------------
>
>                 Key: YARN-5283
>                 URL: https://issues.apache.org/jira/browse/YARN-5283
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: capacity scheduler, fairscheduler, resourcemanager, 
> scheduler
>            Reporter: Ray Chiang
>            Assignee: Ray Chiang
>         Attachments: YARN-5283.001.patch
>
>
> CapacityScheduler#allocateContainersToNode() and 
> FairScheduler#attemptScheduling() have some common code that can be 
> refactored into a common abstract method like 
> AbstractYarnScheduler#assignContainers().



--
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