2013-04-04 188 views

回答

0

您可以编写一个扩展TextOutputFormat并覆盖getRecordWriter()方法的自定义类。在那之内,你可以把输出写到本地的FS。

0

我不认为它必须在hadoop目录中有文件,这取决于你如何运行MapReduce作业。当我从eclipse运行我的mapreduce程序时,它将以“独立”模式运行,并在我的个人文件系统中创建一个文件夹。

mapreduce的另一种操作模式是“分布式”模式。

我的地图减少了驱动程序类行,我提到了输出和输入路径。

FileInputFormat.addInputPath(job, new Path("src/demo/fulldictionary.txt")); 
    FileOutputFormat.setOutputPath(job, new Path("output")); 
+0

以分布式模式运行时会发生什么? – 2013-04-04 01:20:32

+0

Hi Moiz - 请查阅http://hadoop.apache.org/docs/r1.0.4/single_node_setup.html#Local了解更多关于操作模式的细节。 – prashantsunkari 2013-04-07 14:44:49

+0

感谢您的链接 – 2013-04-11 17:29:45