Since FileSystem.get is not thread-safe, I use FileSystem.newInstance instead. but calling newInstance method each time when I need connection to HDFS may not be a good idea. So I made FileSystem connection pool.
This is first question.
Is this good approach?
Because I check Hive source, but they don't use this approach. just use HDFS API directly, and even never use newInstance. Why? how they make new FileSystem connection?
and they don't use FileSystem.close() too.
How they guarantee FileSystem will close?