Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Re: is hadoop FileSystem class thread-safe?


Copy link to this message
-
Re: is hadoop FileSystem class thread-safe?
> On Sun, Aug 5, 2012 at 6:13 PM, Koert Kuipers <[EMAIL PROTECTED]> wrote:
>>
>> Can i share one instance safely amount multiple threads?
>
>

In Hadoop 1.x, FS instances get cached so you end up getting the same
one unless you explicitly say no at the time of retrieval

    conf.setBoolean("fs.hdfs.impl.disable.cache", true);
    FileSystem filesys = FileSystem.get(conf);

This is the way to guarantee isolation. newInstance() is a later feature