关于mapRedece中Iterable循环次数的问题
在自定义的reduce方法中,系统给定的Iterable只能遍历一次
想要循环它,第一次是没问题的
for(Text t : arg1){①}
但要想在接下来再次使用,这个Iterable就变为空了
for(Text t : arg1){①}
for(Text t : arg1){②} --> 这次arg1就空了
那如果需要多次使用,记得在第一次的时候用List集合,接收转移一...
原创
2018-08-23 09:35:39 ·
374 阅读 ·
0 评论