我已经使用 Multipleoutputs 编写了 MapReduce 代码来将数据写入多个文件,但问题是,它正在创建多个文件但没有在其中写入数据,为什么?
IN REDUCE
public MultipleOutputs multipleoutputs;
public void configure(JobConf job)
{
multipleoutputs=new MultipleOutputs(job);
}
public void reduce(....)
{
OutputCollector outcollect=multipleoutputs.getCollector("tfidf","1",reporter);
outcollect.collect(new Text(s),new FloatWritable(tfidf));
}
IN DRIVER
MultipleOutputs.addMultiNamedOutput(conf,"tfidf",TextOutputFormat.class, Text.class,FloatWritable.class);