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

Daryn Sharp commented on HADOOP-8490:
-------------------------------------

The cache partitioning would be extremely useful when you _do want_ the fs 
instance cached, but don't want it to collide with other cached instances.  Ex. 
you want to be able to close all the filesystems that have been acquired after 
an operation.  It's not a one-off thing in the NM.  It would also be nice for 
the FsShell to get a partition in the cache to avoid closing a caller's 
filesystems.

One problem is when code does a {{FileSystem.get(...)}} in many places and 
expects to get the same fs instance.   Using {{newInstance}}, which I 
originally thought of, does not address that case w/o modifying all the code 
(which isn't always feasible) to pass around and use that fs instance.  Code 
that does {{Path#getFileSystem(...)}} won't necessarily know up front which 
unique instances to obtain and then converting the code to pass around and use 
the list of unique instances would be extremely painful.  Basically the user is 
forced to maintain their own cache of filesystems...

bq. Adding conf as a key to current FileSystem cache may break many existing 
applications.

How so?  The cache key is invisible/private?
                
> Add Configuration to FileSystem cache key
> -----------------------------------------
>
>                 Key: HADOOP-8490
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8490
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.23.0, 0.24.0, 2.0.0-alpha
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>
> The {{FileSystem#get(URI, Configuration}} does not take the given 
> {{Configuration}} into consideration before returning an existing fs instance 
> from the cache with a possibly different conf.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to