关注 spark技术分享,
撸spark源码 玩spark最佳实践

TaskResults — DirectTaskResult and IndirectTaskResult

TaskResults — DirectTaskResult and IndirectTaskResult

TaskResult models a task result. It has exactly two concrete implementations:

  1. DirectTaskResult is the TaskResult to be serialized and sent over the wire to the driver together with the result bytes and accumulators.

  2. IndirectTaskResult is the TaskResult that is just a pointer to a task result in a BlockManager.

The decision of the concrete TaskResult is made when a TaskRunner finishes running a task and checks the size of the result.

Note
The types are private[spark].

DirectTaskResult Task Result

DirectTaskResult is the TaskResult of running a task (that is later returned serialized to the driver) when the size of the task’s result is smaller than spark.driver.maxResultSize and spark.task.maxDirectResultSize (or spark.rpc.message.maxSize whatever is smaller).

Note
DirectTaskResult is Java’s java.io.Externalizable.

IndirectTaskResult Task Result

IndirectTaskResult is a TaskResult that…​

Note
IndirectTaskResult is Java’s java.io.Serializable.
赞(0) 打赏
未经允许不得转载:spark技术分享 » TaskResults — DirectTaskResult and IndirectTaskResult
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏