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 "Junping Du (JIRA)" <ji...@apache.org> on 2017/08/31 23:27:00 UTC
[jira] [Commented] (HADOOP-10829) Iteration on
CredentialProviderFactory.serviceLoader is thread-unsafe
[ https://issues.apache.org/jira/browse/HADOOP-10829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149772#comment-16149772 ]
Junping Du commented on HADOOP-10829:
-------------------------------------
Merge to branch-2.8.2 too given 2.7.4 is released and we won't want any bug regression here.
> Iteration on CredentialProviderFactory.serviceLoader is thread-unsafe
> ----------------------------------------------------------------------
>
> Key: HADOOP-10829
> URL: https://issues.apache.org/jira/browse/HADOOP-10829
> Project: Hadoop Common
> Issue Type: Bug
> Components: security
> Affects Versions: 2.6.0
> Reporter: Benoy Antony
> Assignee: Benoy Antony
> Labels: BB2015-05-TBR
> Fix For: 2.9.0, 2.7.4, 3.0.0-beta1, 2.8.2
>
> Attachments: HADOOP-10829.003.patch, HADOOP-10829.patch, HADOOP-10829.patch
>
>
> CredentialProviderFactory uses _ServiceLoader_ framework to load _CredentialProviderFactory_
> {code}
> private static final ServiceLoader<CredentialProviderFactory> serviceLoader =
> ServiceLoader.load(CredentialProviderFactory.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.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org