You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Benoy Antony (JIRA)" <ji...@apache.org> on 2014/07/15 12:38:05 UTC

[jira] [Resolved] (HADOOP-10827) Iteration on KeyProviderFactory.serviceLoader is thread-unsafe

     [ https://issues.apache.org/jira/browse/HADOOP-10827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoy Antony resolved HADOOP-10827.
-----------------------------------

    Resolution: Duplicate

Duplicate of HADOOP-10826 created accidentally.

> Iteration on KeyProviderFactory.serviceLoader  is thread-unsafe
> ---------------------------------------------------------------
>
>                 Key: HADOOP-10827
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10827
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: security
>            Reporter: Benoy Antony
>            Assignee: Benoy Antony
>
> KeyProviderFactory uses _ServiceLoader_ framework to load _KeyProviderFactory_
> {code}
>   private static final ServiceLoader<KeyProviderFactory> serviceLoader =
>       ServiceLoader.load(KeyProviderFactory.class);
> {code}
> The _ServiceLoader_ framework does lazy initialization of services which makes it thread unsafe. If accessed from multiple threads, it is better to synchronize the access.
> Similar synchronization has been done while loading compression codec providers via HADOOP-8406.



--
This message was sent by Atlassian JIRA
(v6.2#6252)