hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-10437) ReconfigurationProtocol not covered by HDFSPolicyProvider.
Date Sat, 18 Jun 2016 06:26:05 GMT

     [ 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.

-    policyProviderProtocols = new ArrayList<>(services.length);
+    policyProviderProtocols = new HashSet<>(services.length);

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

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

View raw message