6. RDD综合练习:更丰富的操作
集合运算练习
union(), intersection(),subtract(), cartesian()
内连接与外连接
join(), leftOuterJoin(), rightOuterJoin(), fullOuterJoin()
持久化 scm.cache()
总共有多少学生?map(), distinct(), count()
开设了多少门课程?map(), distinct(), count()
生成(姓名,课程分数)键值对RDD,观察keys(),values()
每个学生选修了多少门课?map(), countByKey()
每门课程有多少个学生选?map(), countByValue()
有多少个100分?
Tom选修了几门课?每门课多少分?filter(), map() RDD