![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spark
jasonwang_
all or nothing
展开
-
查看spark RDD 各分区内容
mapPartitionsWithIndexdef mapPartitionsWithIndex[U](f: (Int, Iterator[T]) => Iterator[U], preservesPartitioning: Boolean = false)(implicit arg0: ClassTag[U]): RDD[U]函数作用同mapPartitions,不过提供了两个参数,第一个...原创 2018-05-18 20:43:30 · 5500 阅读 · 2 评论 -
spark graphx 实现二跳邻居统计——使用pregel
本文是对二跳邻居统计的实战,因为用到了pregel,需要对pregel模型有一些大致的了解,例如各个参数的意义,各个函数的作用,以及大致的流程。最核心的应该就是消息发送函数这个部分,注释中有对两轮迭代的过程有解释。def main(args: Array[String]): Unit = { case class Person(id: String, tel: String, relate...转载 2018-07-14 21:40:17 · 2738 阅读 · 0 评论