只要修改OrderReducer.java的reduce方法,修改为:
int i = 0; for(NullWritable nullWritable:values){ if(i>=2) break; context.write(key,NullWritable.get()); i++; }
本文共 219 字,大约阅读时间需要 1 分钟。
只要修改OrderReducer.java的reduce方法,修改为:
int i = 0; for(NullWritable nullWritable:values){ if(i>=2) break; context.write(key,NullWritable.get()); i++; }
转载于:https://www.cnblogs.com/mediocreWorld/p/11041953.html