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

Hudson commented on HADOOP-11659:
---------------------------------

SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #127 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/127/])
HADOOP-11659. o.a.h.FileSystem.Cache#remove should use a single hash map 
lookup. Contributed by Brahma Reddy Battula. (aajisaka: rev 
34117325b29f0f1bdbe21343e7fd07e9ad0af907)
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> o.a.h.fs.FileSystem.Cache#remove should use a single hash map lookup
> --------------------------------------------------------------------
>
>                 Key: HADOOP-11659
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11659
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.6.0
>            Reporter: Gera Shegalov
>            Assignee: Brahma Reddy Battula
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: HADDOOP-11659-004.patch, HADOOP-11659-002.patch, 
> HADOOP-11659-003.patch, HADOOP-11659.patch
>
>
> The method looks up the same key in the same hash map potentially 3 times
> {code}
> if (map.containsKey(key) && fs == map.get(key)) {
>   map.remove(key)
> {code}
> Instead it could do a single lookup
> {code}
> FileSystem cachedFs = map.remove(key);
> {code}
> and then test cachedFs == fs or something else.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to