hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinod Kumar Vavilapalli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11209) Configuration#updatingResource/finalParameters are not thread-safe
Date Sun, 01 Mar 2015 20:35:05 GMT

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

Vinod Kumar Vavilapalli commented on HADOOP-11209:

[~ozawa] / [~varun_saxena], we had a different JIRA and a patch upload before this one got
opened - HADOOP-11274. That patch does this + a little more.

IAC, given this patch is already in, nothing to do. Closing the other one.

> Configuration#updatingResource/finalParameters are not thread-safe
> ------------------------------------------------------------------
>                 Key: HADOOP-11209
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11209
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.6.0
>            Reporter: Josh Rosen
>            Assignee: Varun Saxena
>             Fix For: 2.7.0
>         Attachments: HADOOP-11209.001.patch, HADOOP-11209.002.patch, HADOOP-11209.003.patch,
> {{Configuration}} objects are not fully thread-safe, which causes problems in multi-threaded
frameworks like Spark that use these configurations to interact with existing Hadoop APIs
(such as InputFormats).
> SPARK-2546 is an example of a problem caused by this lack of thread-safety.  In that
bug, multiple concurrent modifications of the same Configuration (in third-party code) caused
an infinite loop because Configuration's internal {{java.util.HashMap}} is not thread-safe.
> One workaround is for our code to clone Configuration objects; unfortunately, this also
suffers from thread-safety issues on older Hadoop versions because Configuration's constructor
wasn't thread-safe (HADOOP-10456).
> [Looking at a recent version of Configuration.java|https://github.com/apache/hadoop/blob/d989ac04449dc33da5e2c32a7f24d59cc92de536/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L666],
it seems that the private {{updatingResource}} HashMap and {{finalParameters}} HashSet fields
the only non-thread-safe collections in Configuration (Java's {{Properties}} class is thread-safe),
so I don't think that it would be hard to make Configuration fully thread-safe.

This message was sent by Atlassian JIRA

View raw message