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

Yang Wang commented on YARN-8984:
---------------------------------

[~cheersyang], I do not think it will throw a NPE when setAllocationTags to 
null. 

ContainerPBImpl#getAllocationTags() will new a empty hashSet when the tag is 
null. SchedulingRequestPBImpl#getAllocationTags() will also new a empty hashSet 
when tag is null. So the null check is not necessary. Btw, put/get null to a 
HashMap will not throw NPE.

[~botong], Thanks for your reply. The allocationTag in the SchedulingRequest in 
AMRMClient is empty, so RM will not set any tag for the allocated containers.

[~kkaranasos], Thanks for your reply.

You are right, the Scheduling Requests are used for placement constraints. 
However, it does not mean we have to set the allocationTag for each Scheduling 
Request. We have use the SchedulingRequest instead of ResourceRequest in our 
computing framework to allocate resource. So we got this issue.

> AMRMClient#OutstandingSchedRequests leaks when AllocationTags is null or empty
> ------------------------------------------------------------------------------
>
>                 Key: YARN-8984
>                 URL: https://issues.apache.org/jira/browse/YARN-8984
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Yang Wang
>            Assignee: Yang Wang
>            Priority: Critical
>         Attachments: YARN-8984-001.patch, YARN-8984-002.patch, 
> YARN-8984-003.patch
>
>
> In AMRMClient, outstandingSchedRequests should be removed or decreased when 
> container allocated. However, it could not work when allocation tag is null 
> or empty.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to