spark stage 中的CallSite

先看源码注释中的内容

CallSite represents a place in user code. It can have a short and a long form.
  /* CallSite表示用户代码中的一个位置。它可以有短的和长的形式。 */

实际去debug一个案例 查看,callsite中存储了哪些内容。

下边两张图为自己的代码。

spark stage 中的CallSite

spark stage 中的CallSite

spark stage 中的CallSite

下边一张图为stage的内容。

spark stage 中的CallSite

 

正如注释写的一样 ,callsite  分为log和short。名字为logfrom  shortfrom。按照字面意思理解,这个stage从哪里来 怎么得到的。short中直接给了一个 rdd定义的位置,那么callsite short信息 在描述 该stage内有哪些rdd,并且这些rdd在代码第几行定义。

callsite long相对来说就更详细。

spark stage 中的CallSite

为什么要做这件事,个人猜测和执行效率或者容错有关