You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Henry Hung <YT...@winbond.com> on 2014/01/06 10:12:02 UTC

accessing hadoop filesystem from Tomcat

Hi all,

I just want to confirm if my understanding with Hadoop FileSystem object is correct or not.

>From the source code of org.apache.hadoop.fs. FileSystem (either from version 1.0.4 or 2.2.0), the method
public static FileSystem get(URI uri, Configuration conf) throws IOException

is using some sort of cache:
CACHE.get(uri, conf);

My understanding is that Tomcat usually create multiple threads to handle Http requests, and those threads will use the same FileSystem object (because of the cache).
This will resulting in an error, right?

The next question is, if I want to disable the cache, should I just introduce a new key "fs.hdfs.impl.disable.cache" and set the value to "true"?
And another key "fs.har.impl.disable.cache" for HAR FileSystem?

Best regards,
Henry

________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.