RDD算子——转换操作(Transformations )【map、flatMap、reduceByKey】
一、mapmap算子#spark-shellsc.parallelize(Seq(1,2,3)).map(num=>num*10).collect()#IDEA@TestdefmapTest():Unit={//1.创建RDDvalrdd1=sc.parallelize(Seq(1,2,3))//2.执行map操作valrdd2=rdd1.map(item=>item*10)//3.得到结果val