我的 Mapper 代码中有这个,其中 'a' 是一个 DoubleWritable 数组。
DoubleArrayWritable ad = new DoubleArrayWritable();
ad.set(a);
int row_id1=(int)row_id;
context.write(new LongWritable(row_id1),new Text(ad.toString()));
我只是将这些输入打印到reducer作为reducer的输出,我将它作为reducer的输出,
1 DoubleArrayWritable@e29820
2 DoubleArrayWritable@718242
3 DoubleArrayWritable@1ec58a
4 DoubleArrayWritable@3afb99
我错过了什么?我想输出为
1 2 3 4 7
2 4 6 5 9
3 4 5 7 3