hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7115) Add a cache for getpwuid_r and getpwgid_r calls
Date Wed, 07 Nov 2012 22:16:13 GMT

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

Todd Lipcon commented on HADOOP-7115:
-------------------------------------

{code}
+    cacheTimeout = new Configuration().getLong(
+      CommonConfigurationKeys.HADOOP_SECURITY_UID_NAME_CACHE_TIMEOUT_KEY,
+      CommonConfigurationKeys.HADOOP_SECURITY_UID_NAME_CACHE_TIMEOUT_DEFAULT) *
+      1000;
+    LOG.debug("Initialized cache for IDs to User/Group mapping with a" +
+      " cache timeout of " + cacheTimeout/1000 + " seconds.");
{code}

This should move up into the try block above -- if the native library fails to load, then
it shouldn't log this debug message (since the cache won't ever be used). Additionally you
can reuse the Configuration instance that's already constructed above.


- Just noticed an addition of {{syslog.h}} to the native code - doesn't seem to be used.


Otherwise looks good.

                
> Add a cache for getpwuid_r and getpwgid_r calls
> -----------------------------------------------
>
>                 Key: HADOOP-7115
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7115
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.22.0, 2.0.2-alpha, 0.23.4
>            Reporter: Arun C Murthy
>            Assignee: Alejandro Abdelnur
>             Fix For: 0.22.1, 2.0.3-alpha
>
>         Attachments: h-7115.1.patch, hadoop-7115-0.22.patch, hadoop-7115-0.22.patch,
HADOOP-7115.patch, HADOOP-7115.patch
>
>
> As discussed in HADOOP-6978, a cache helps a lot.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message