spark mapvalues java_spark中常用转换操作keys 、values和mapValues-CSDN博客

网站介绍:文章浏览阅读303次。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:..._java spark2.x中getvaluesmap使用