Jian He commented on YARN-4026:

- why "assignment.setFulfilledReservation(true);" is called in Reserved state ?
      if (result.getAllocationState() == AllocationState.RESERVED) {
        // This is a reserved container
        LOG.info("Reserved container " + " application="
            + application.getApplicationId() + " resource=" + allocatedResource
            + " queue=" + this.toString() + " cluster=" + clusterResource);
      } else {

-  I think here can always return ContainerAllocation.LOCALITY_SKIPPED as the 
semantics of this method is to try to allocate a container for certain 
      return type == NodeType.OFF_SWITCH ? ContainerAllocation.APP_SKIPPED
          : ContainerAllocation.LOCALITY_SKIPPED;
The caller here can choose to return APP_SKIPPED if it sees the LOCALITY_SKIPPED
      assigned =
          assignOffSwitchContainers(clusterResource, offSwitchResourceRequest,
              node, priority, reservedContainer, schedulingMode,
      assigned.requestNodeType = requestType;

      return assigned;

> FiCaSchedulerApp: ContainerAllocator should be able to choose how to order 
> pending resource requests
> ----------------------------------------------------------------------------------------------------
>                 Key: YARN-4026
>                 URL: https://issues.apache.org/jira/browse/YARN-4026
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>         Attachments: YARN-4026.1.patch
> After YARN-3983, we have an extensible ContainerAllocator which can be used 
> by FiCaSchedulerApp to decide how to allocate resources.
> While working on YARN-1651 (allocate resource to increase container), I found 
> one thing in existing logic not flexible enough:
> - ContainerAllocator decides what to allocate for a given node and priority: 
> To support different kinds of resource allocation, for example, priority as 
> weight / skip priority or not, etc. It's better to let ContainerAllocator to 
> choose how to order pending resource requests.

This message was sent by Atlassian JIRA

Reply via email to