hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10353) FsUrlStreamHandlerFactory is not thread safe
Date Fri, 28 Feb 2014 11:16:24 GMT

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

Hudson commented on HADOOP-10353:
---------------------------------

SUCCESS: Integrated in Hadoop-Yarn-trunk #495 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/495/])
HADOOP-10353. Correct CHANGES.txt. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1572680)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
HADOOP-10353. FsUrlStreamHandlerFactory is not thread safe. Contributed by Tudor Scurtu. (cnauroth:
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1572679)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsUrlStreamHandlerFactory.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandler.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandlerFactory.java


> FsUrlStreamHandlerFactory is not thread safe
> --------------------------------------------
>
>                 Key: HADOOP-10353
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10353
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.3.0
>            Reporter: Tudor Scurtu
>            Assignee: Tudor Scurtu
>              Labels: race-condition
>             Fix For: 3.0.0, 2.4.0
>
>         Attachments: HADOOP-10353.patch, HADOOP-10353.v2.patch
>
>
> The {{FsUrlStreamHandlerFactory}} class uses a plain {{HashMap}} for caching.
> When the number of inserted values exceeds the the map's load threshold, it triggers
a rehash. During this time, a different thread that performs a get operation on a previously
inserted key can obtain a null value instead of the actual value associated with that key.
> The result is a NPE potentially being thrown when calling {{FsUrlStreamHandlerFactory#createURLStreamHandler(String
protocol)}} concurrently.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message