hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <qwertyman...@gmail.com>
Subject Re: Open HDFS in mappers
Date Fri, 11 Mar 2011 02:44:53 GMT
Once you have a JobConf/Configuration conf object in your Mapper (via
setup/configure methods), you can do the following to get the default
file-system impl:

    FileSystem fs = FileSystem.get(conf); // Gets the fs.default.name
file-system impl.

Then use fs to open/create/etc. any file you need on the set fs.default.name.
-- 
Harsh J
www.harshj.com

Mime
View raw message