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

TaskLocation

TaskLocation

TaskLocation is a location where a task should run.

TaskLocation can either be a host alone or a (host, executorID) pair (as ExecutorCacheTaskLocation).

With ExecutorCacheTaskLocation the Spark scheduler prefers to launch the task on the given executor, but the next level of preference is any executor on the same host if this is not possible.

Note
TaskLocation is a Scala private[spark] sealed trait (i.e. all the available implementations of TaskLocation trait are in a single Scala file).
Table 1. Available TaskLocations
Name Description

HostTaskLocation

A location on a host.

ExecutorCacheTaskLocation

A location that includes both a host and an executor id on that host.

HDFSCacheTaskLocation

A location on a host that is cached by Hadoop HDFS.

Used exclusively when HadoopRDD and NewHadoopRDD are requested for their placement preferences (aka preferred locations).

赞(0) 打赏
未经允许不得转载:spark技术分享 » TaskLocation
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏