把超过某一个数的拿出来collect
val filterRdd = sc.parallelize(List(1,2,3,4,5)).map(_*2).filter(_>5) filterRdd.collect # res5: Array[Int] = Array(6, 8, 10)
原文地址:https://www.cnblogs.com/pocahontas/p/11441040.html
时间: 2024-11-02 19:40:30
把超过某一个数的拿出来collect
val filterRdd = sc.parallelize(List(1,2,3,4,5)).map(_*2).filter(_>5) filterRdd.collect # res5: Array[Int] = Array(6, 8, 10)
原文地址:https://www.cnblogs.com/pocahontas/p/11441040.html