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

Jian He commented on YARN-5716:
-------------------------------

- why volatile
{code}
    private volatile BlockingQueue<ResourceCommitRequest<FiCaSchedulerApp, 
FiCaSchedulerNode>>
        backlogs = new LinkedBlockingQueue<>();
{code}
- 1 millisecond ? is this intentional ?
{code}
            // Don't run schedule if we have some pending backlogs already
            if (cs.getAsyncSchedulingPendingBacklogs() > 100) {
              Thread.sleep(1);
{code}
- getReservedSchedulerKey vs getAllocatedSchedulerKey: looks like the same ?
- allocateContainersToNode: remove withNodeHeartbeat flag. Make the other 
caller call "allocateContainersToNode(PlacementSet<FiCaSchedulerNode> ps" 
directly 
- "allocateContainersToNode(PlacementSet<FiCaSchedulerNode> ps ":  maybe use 
lookAtSingleNode boolean to fork the code path. Make a separate method.

-  the first if condition is probably not needed.
{code}
    if (null != allocated || null != reserved || (null != released && !released
        .isEmpty())) {
      List<ContainerAllocationContext<FiCaSchedulerApp, FiCaSchedulerNode>>
          allocationsList = null;
      if (allocated != null) {
        allocationsList = new ArrayList<>();
        allocationsList.add(allocated);
      }

      List<ContainerAllocationContext<FiCaSchedulerApp, FiCaSchedulerNode>>
          reservationsList = null;
      if (reserved != null) {
        reservationsList = new ArrayList<>();
        reservationsList.add(reserved);
      }

      return new ResourceCommitRequest<>(allocationsList, reservationsList,
          released);
    }
{code}

> Add global scheduler interface definition and update CapacityScheduler to use 
> it.
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-5716
>                 URL: https://issues.apache.org/jira/browse/YARN-5716
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>         Attachments: YARN-5716.001.patch, YARN-5716.002.patch
>
>
> Target of this JIRA:
> - Definition of interfaces / objects which will be used by global scheduling, 
> this will be shared by different schedulers.
> - Modify CapacityScheduler to use it.



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

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

Reply via email to