How to show top N number of results with customization in spark rdd?

前端 未结 0 1155
挽巷
挽巷 2020-12-08 01:42
val sorting = sc.parallelize(List(1,1,1,2,2,2,2,3,3,3,4,4,4,4,5,5,5,6,6,7,8,8,8,8,8))
sorting.map(x=>(x,1)).reduceByKey((a,b)=>a+b).map(x=>(x._1,"==>         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题