06 RDD编程
一、词频统计:
按字母顺序排序

按词频排序

二、学生课程分数案例
- 总共有多少学生?map(), distinct(), count()
![]()
- 开设了多少门课程?
![]()
- 每个学生选修了多少门课?map().countByValue() //map(), countByKey()
![]()
- 每门课程有多少个学生选?map(), countByValue()
![]()
- Tom选修了几门课?每门课多少分?filter(), map() RDD
![]()
- Tom选修了几门课?每门课多少分?map(),lookup() list
- Tom的成绩按分数大小排序。filter(), map(), sortBy()
- Tom的平均分。map(),lookup(),mean()
- 求每门课的选修人数及平均分。combineByKey()






浙公网安备 33010602011771号