You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "LongGang Chen (JIRA)" <ji...@apache.org> on 2018/05/24 07:31:00 UTC

[jira] [Created] (YARN-8354) SingleConstraintAppPlacementAllocator's allocate does not decPendingResource

LongGang Chen created YARN-8354:
-----------------------------------

             Summary: SingleConstraintAppPlacementAllocator's allocate does not decPendingResource
                 Key: YARN-8354
                 URL: https://issues.apache.org/jira/browse/YARN-8354
             Project: Hadoop YARN
          Issue Type: Bug
            Reporter: LongGang Chen


SingleConstraintAppPlacementAllocator.allocate()  does not decPendingResource,only 

reduce ResourceSizing.numAllocations by one.

may be we should change 

decreasePendingNumAllocation() form :

 
{code:java}
private void decreasePendingNumAllocation() {
  // Deduct pending #allocations by 1
  ResourceSizing sizing = schedulingRequest.getResourceSizing();
  sizing.setNumAllocations(sizing.getNumAllocations() - 1);
}
{code}
to:
{code:java}
private void decreasePendingNumAllocation() {
  // Deduct pending #allocations by 1
  ResourceSizing sizing = schedulingRequest.getResourceSizing();
  sizing.setNumAllocations(sizing.getNumAllocations() - 1);
  // Deduct pending resource of app and queue
  if (getExecutionType() == ExecutionType.OPPORTUNISTIC) {
    appSchedulingInfo.decOpportunisticPendingResource(
        schedulingRequest.getNodeLabelExpression(),
        sizing.getResources());
  }else{
    appSchedulingInfo.decPendingResource(
        schedulingRequest.getNodeLabelExpression(),
        sizing.getResources());
  }
}

{code}
 

 



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

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