运行Step4_Update2.java,查看输出结果
~ hadoop fs -cat /user/hdfs/recommend/step6/part-r-00000 1 107,5.0 1 106,18.0 1 105,15.5 1 104,33.5 1 103,39.0 1 102,31.5 1 101,44.0 2 107,4.0 2 106,20.5 2 105,15.5 2 104,36.0 2 103,41.5 2 102,32.5 2 101,45.5 3 107,15.5 3 106,16.5 3 105,26.0 3 104,38.0 3 103,24.5 3 102,18.5 3 101,40.0 4 107,9.5 4 106,33.0 4 105,26.0 4 104,55.0 4 103,53.5 4 102,37.0 4 101,63.0 5 107,11.5 5 106,34.5 5 105,32.0 5 104,59.0 5 103,56.5 5 102,42.5 5 101,68.0这样我们就把原来内存中计算的部分,通过MapReduce实现了,结果与之间Step4的结果一致。