[
https://issues.apache.org/jira/browse/HADOOP-17079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270218#comment-17270218
]
Ahmed Hussein commented on HADOOP-17079:
----------------------------------------
[~xyao] I noticed that in
[LdapGroupsMapping.java|https://github.com/apache/hadoop/commit/f91a8ad88b00b50231f1ae3f8820a25c963bb561#diff-34cbaed59eb28984bdb38185b850527c6bc2088d2295fee6657333084aeab668R670]
[commit-f91a8ad|https://github.com/apache/hadoop/commit/f91a8ad88b00b50231f1ae3f8820a25c963bb561#diff-34cbaed59eb28984bdb38185b850527c6bc2088d2295fee6657333084aeab668R670],
I found that {{getGroupSet()}} is not "synchronized" while the original
{{getGroups()}} is. I see that you changed the variables to volatile, but this
won't guarantee atomicity. Have you verified that the concurrency is not
affected by that change?
> Optimize UGI#getGroups by adding UGI#getGroupsSet
> -------------------------------------------------
>
> Key: HADOOP-17079
> URL: https://issues.apache.org/jira/browse/HADOOP-17079
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Xiaoyu Yao
> Assignee: Xiaoyu Yao
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Attachments: HADOOP-17079.002.patch, HADOOP-17079.003.patch,
> HADOOP-17079.004.patch, HADOOP-17079.005.patch, HADOOP-17079.006.patch,
> HADOOP-17079.007.patch
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> UGI#getGroups has been optimized with HADOOP-13442 by avoiding the
> List->Set->List conversion. However the returned list is not optimized to
> contains lookup, especially the user's group membership list is huge
> (thousands+) . This ticket is opened to add a UGI#getGroupsSet and use
> Set#contains() instead of List#contains() to speed up large group look up
> while minimize List->Set conversions in Groups#getGroups() call.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]