hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11209) Configuration is not thread-safe
Date Sun, 28 Dec 2014 13:46:13 GMT

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

Hadoop QA commented on HADOOP-11209:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12689254/HADOOP-11209.002.patch
  against trunk revision 1454efe.

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with eclipse:eclipse.

    {color:red}-1 findbugs{color}.  The patch appears to introduce 2 new Findbugs (version
2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in hadoop-common-project/hadoop-common.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/5350//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/5350//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/5350//console

This message is automatically generated.

> Configuration is not thread-safe
> --------------------------------
>
>                 Key: HADOOP-11209
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11209
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>            Reporter: Josh Rosen
>            Assignee: Varun Saxena
>         Attachments: HADOOP-11209.001.patch, HADOOP-11209.002.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
(v6.3.4#6332)

Mime
View raw message