Spark 异步Action
异步不保序,但大作业执行时间后移。
.set("spark.scheduler.mode", "FAIR")
公平调度,充分使用集群资源。
def
collectAsync(): FutureAction[Seq[T]]
Returns a future for retrieving all elements of this RDD.
def
countAsync(): FutureAction[Long]
Returns a future for counting the number of elements in the RDD.
def
foreachAsync(f: (T) ⇒ Unit): FutureAction[Unit]
Applies a function f to all elements of this RDD.
def
foreachPartitionAsync(f: (Iterator[T]) ⇒ Unit): FutureAction[Unit]
Applies a function f to each partition of this RDD.
def
takeAsync(num: Int): FutureAction[Seq[T]]
Permalink
Returns a future for retrieving the first num elements of the RDD.
澄轶: suanec -
http://www.cnblogs.com/suanec/
友链:marsggbo
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
点个关注吧~
http://www.cnblogs.com/suanec/
友链:marsggbo
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
点个关注吧~