草庐IT

KeyFieldBasedPartitioner

全部标签

使用 KeyFieldBasedPartitioner 分割 hadoop 文件

我有一个大文件,格式如下samplename\tindex\tscore我正在尝试使用HadoopStreaming根据示例名称拆分此文件。我提前知道有多少个样本,所以可以指定我需要多少个reducer。这post正在做非常相似的事情,所以我知道这是可能的。我尝试使用以下脚本将此文件拆分为16个文件(有16个样本)hadoopjar$STREAMING\-Dmapred.text.key.partitioner.options=-k1,1\-Dstream.num.map.output.key.fields=2\-Dmapred.reduce.tasks=16\-partitioner