You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by shensl <sh...@163.com> on 2010/03/11 16:20:34 UTC
Can map/reduce read local file system?
Can map/reduce read local file system? My map/reduce cannot read localhost file, is there any wrong in my code ?
protected void map(Object arg0, Object arg1, Context context)
throws IOException, InterruptedException {
Configuration conf = context.getConfiguration();
LocalFileSystem lfs = FileSystem.getLocal(conf);
FSDataOutputStream out = lfs.create(new Path("abc.txt"));
out.writeUTF("abc");
out.close();
}
Thanks and Regards!