[ https://issues.apache.org/jira/browse/HDFS-10437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Nauroth updated HDFS-10437: --------------------------------- Assignee: Arpit Agarwal (was: Xiaobing Zhou) Hadoop Flags: Reviewed +1 for patch 02, pending pre-commit. {code} - policyProviderProtocols = new ArrayList<>(services.length); + policyProviderProtocols = new HashSet<>(services.length); {code} Just a very minor nit: Passing a length to a collection constructor is usually meant to avoid a memory realloc when the expected length is known. With the switch from {{ArrayList}} to {{HashSet}}, that doesn't really work anymore though, because the argument is now interpreted as the internal hash table's capacity, with a realloc occurring after exceeding (capacity * load factor), which defaults to 0.75. Things like Guava's {{Maps#newHashMapWithExpectedSize}} internally do some math on the argument to scale it up and try to stay ahead of the load factor to prevent a realloc. It doesn't really matter much here, where it's just test code and the data set is tiny, so I'm still +1 for the patch. It's just a common pitfall of the {{HashMap}}/{{HashSet}} API. Thanks for the patch! > ReconfigurationProtocol not covered by HDFSPolicyProvider. > ---------------------------------------------------------- > > Key: HDFS-10437 > URL: https://issues.apache.org/jira/browse/HDFS-10437 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.8.0 > Reporter: Chris Nauroth > Assignee: Arpit Agarwal > Attachments: HDFS-10437.01.patch, HDFS-10437.02.patch > > > The {{HDFSPolicyProvider}} class contains an entry for defining the security > policy of each HDFS RPC protocol interface. {{ReconfigurationProtocol}} is > not listed currently. This may indicate that reconfiguration functionality > is not working correctly in secured clusters. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org