Liwei Lin

Results 61 comments of Liwei Lin

@wangwenting ~~没有遇到过。以下代码是 checkpoint + broadcast,起停了几次都是正常运行的,请参考:……~~ Update: 代码已删除,原来的代码在 local 运行有效、但放到 Yarn 上跑确实有问题。 正确的代码请见 [Streaming 官方 Programming Guide](http://spark.apache.org/docs/latest/streaming-programming-guide.html#accumulators-and-broadcast-variables)。

@romantic123 是的,如果整个 app 只有 1 个 receiver,那数据就会只收到 1 个或 2 个 Executor 上(看数据冗余是配了总共 1 份还是 2 份),数据会倾斜很多。 这种情况下一般是起多个 receiver,分别消费数据的不同部分,而且 Spark Streaming 会保证 receiver 均分到不同的 Executor 上,这样数据就可以均分到不同的 Executor 上了,同时计算时又会有很好的 data locality。

@wangwenting 之前贴的代码确实有问题,从你上面的解释里也学习到了 accumulators & broadcast 在 Streaming 里的正确用法,感谢感谢!

@Adamyuanyuan 确实第一张图不对。你找的这张图(Spark 1.2 版本)结构上是正确的,除了 Spark 1.2 以来有些类的名字对不上了需要修改下 —— 稍后我把图给更新一下。Thanks for bringing this up!

@bjkonglu 主要是修改 BlockRDD.scala,修改后整个文件源码如下: ```scala /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work...

@Dreamtecher 非常好的问题 —— 但目前的版本(as of 2017.09, Spark 2.2.0)我没有想到更好的写法。

其他同学也看到这里的话也可以直接扫微信加我。 二维码打算保留 7 天,过期删除。

> @marlin5555 Good catch! > 感谢指出,稍后我就改改 :-) Update: 已改正,thanks!

@endymecy Would you like to issue a PR to fix? Thanks!

@klion26 Would you like to issue a PR to fix? Thanks!