scala交互式操做 reduceByKey mapValues

scala> val c = sc.parallelize(List("aaa","b","b","c")) c: org.apache.spark.rdd.RDD[String] = ParallelCollectionRDD[8] at parallelize at <console>:21 //作一個映射 scala> c.map(x => (x,x.length)) res7: org.a
相關文章
相關標籤/搜索