摘要:
rdd.toDebugString 是个好东西,可以输出你的RDD的组成 阅读全文
posted @ 2015-05-12 16:03
HarkLee
阅读(782)
评论(0)
推荐(0)
摘要:
copy的官方programming guide的代码,只有一个要说一下,Accumulators的更新是在action做的,transformation操作中对于Accumulators的增加不会即时更新的,只有action只会更新。scala> val accum = sc.accumulato... 阅读全文
posted @ 2015-05-12 15:52
HarkLee
阅读(390)
评论(0)
推荐(0)
摘要:
coalesce我理解就是将多个partition合并成少量的partition。data.coalesce(2,true)第一个参数是partition数量第二个参数是合并是是否进行shuffle操作。true是进行shuffle操作。false是不进行shuffle操作 阅读全文
posted @ 2015-05-12 12:01
HarkLee
阅读(313)
评论(0)
推荐(0)
摘要:
def seq(a:Int, b:Int) : Int ={ math.max(a,b)}def comb(a:Int, b:Int) : Int ={ a + b}val data = sc.parallelize(List((1,3),(1,2),(1, 4),(2,3)))data.aggre... 阅读全文
posted @ 2015-05-12 11:16
HarkLee
阅读(2884)
评论(1)
推荐(1)

浙公网安备 33010602011771号