06 RDD编程

二、学生课程分数案例

1.总共有多少学生?map(), distinct(), count()

 

 

 

 

2.开设了多少门课程?

 

3.每个学生选修了多少门课?map(), countByKey()

 

 

4.每门课程有多少个学生选?map(), countByValue()

 

 

5.Tom选修了几门课?每门课多少分?filter(), map() RDD

 

 

6.Tom选修了几门课?每门课多少分?map(),lookup()  list

 

7.Tom的成绩按分数大小排序。filter(), map(), sortBy()

 

8.Tom的平均分。map(),lookup(),mean()

 

9.求每门课的选修人数及平均分。combineByKey()

 

posted @ 2021-04-12 21:16  7poom  阅读(49)  评论(0编辑  收藏  举报