[
https://issues.apache.org/jira/browse/YARN-8984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16679297#comment-16679297
]
Weiwei Yang commented on YARN-8984:
-----------------------------------
Hi [~fly_in_gis]
{quote}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.
{quote}
Use null as hashmap's key/value can be buggy, we should avoid that as much as
possible. I checked ContainerPBImpl and SchedulingRequestPBImpl, like you said,
they have null protection code. So mostly seems it would work fine.
About [~kkaranasos]'s point
{quote}the Scheduling Requests are used only in case we have placement
constraints (at least this was the initial design, not sure if things have
changed recently).
{quote}
I think we cannot assume scheduling requests all come with placement
constraints, or allocation tags. Two reasons,
1. It was defined as optional field in proto file
{code:java}
message SchedulingRequestProto {
...
optional PlacementConstraintProto placementConstraint = 6;
}
{code}
2. When uses node-attribute in placement constraint, allocation tags might be
empty.
Thanks
> 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]