【发布时间】:2018-09-13 17:10:36
【问题描述】:
我有一个需要生成一堆 xml 文件的减速器脚本。我想使用 reducer 键以编程方式设置文件名。我正在使用MultipleOutputs 来完成此操作,如下所示。
MultipleOutputs mos = new MultipleOutputs(context);
mos.write(new Text(key), new Text(output), key + ".xml");
但输出文件名类似于key.xml-r-00000。如何从文件名中删除-r-* 部分,使其成为简单的key.xml?
【问题讨论】:
标签: hadoop mapreduce reducers multipleoutputs