spark mapvalues java_spark中常用转换操作keys 、values和mapValues
1.keys功能:返回所有键值对的key示例val list = List("hadoop","spark","hive","spark")val rdd = sc.parallelize(list)val pairRdd = rdd.map(x => (x,1))pairRdd.keys.collect.foreach(println)结果hadoopsparkhivesparklist:...