FileSystem.get(Uri,Configuration,String) caching issue

2012-09-10 Thread Himanshu Gupta
I am using FileSystem.get(URI uri, Configuration conf, String user) to create FileSystem implementation(LocalFileSystem in this case) instances. From what I know, FileSystem internally has a cache to retain the objects based on uri and user. So if I call FileSystem.get(..) method multiple times wit

Re: FileSystem.get(Uri,Configuration,String) caching issue

2012-09-10 Thread Harsh J
What you're seeing is genuine. You seem to be hitting the abuse scenario described by Daryn here: https://issues.apache.org/jira/browse/HDFS-3545?focusedCommentId=13398502&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13398502 You can instead choose to skip passing

Re: FileSystem.get(Uri,Configuration,String) caching issue

2012-09-10 Thread Daryn Sharp
Yes, the sample code demonstrates what happens when you use a new UGI for every FileSystem.get. If possible you should avoid the variant of fs.get that accepts the user as a string since it may create another UGI from the string user on every call. The cache will fill with instances for every

Re: FileSystem.get(Uri,Configuration,String) caching issue

2012-09-11 Thread Himanshu Gupta
- Original Message - From: Daryn Sharp To: "user@hadoop.apache.org" Cc: Himanshu Gupta Sent: Tuesday, 11 September 2012 12:49 AM Subject: Re: FileSystem.get(Uri,Configuration,String) caching issue Yes, the sample code demonstrates what happens when you use a new UGI for every