hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brahma Reddy Battula (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11659) o.a.h.fs.FileSystem.Cache#remove should use a single hash map lookup
Date Tue, 10 Mar 2015 05:01:38 GMT

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

Brahma Reddy Battula commented on HADOOP-11659:
-----------------------------------------------

Thanks a lot for review..Updated the patch based on your review comments..Kindly Review..

> 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
>         Attachments: HADOOP-11659-002.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)

Mime
View raw message