Spark-futureAction
来源:互联网 发布:linux分页显示命令 编辑:程序博客网 时间:2024/06/03 13:33
Spark-futureAction
@(spark)[FutureAction]
FutureAction
* A future for the result of an action to support cancellation. This is an extension of the * Scala Future interface to support cancellation. */ trait FutureAction[T] extends Future[T] {
SimpleFutureAction
/** * A [[FutureAction]] holding the result of an action that triggers a single job. Examples include * count, collect, reduce. */ class SimpleFutureAction[T] private[spark](jobWaiter: JobWaiter[_], resultFunc: => T)
- SimpleFutureAction的核心实际上是那个叫做JobWaiter,它本身是个listener。
- cancel也是通过JobWaiter实现的
JavaFutureActionWrapper
就是对JavaFutureAction的封装
ComplexFutureAction
/** * A [[FutureAction]] for actions that could trigger multiple Spark jobs. Examples include take, * takeSample. Cancellation works by setting the cancelled flag to true and interrupting the * action thread if it is being blocked by a job. */ class ComplexFutureAction[T] extends FutureAction[T] {
关于scala的promise和future,请参考
基本上就是runJob之后就一直block。
0 0
- Spark-futureAction
- spark
- spark
- Spark
- spark
- Spark
- spark
- Spark
- Spark
- spark
- Spark
- SPARK
- Spark
- Spark
- Spark
- spark
- spark
- Spark
- 线性回归
- Spark-Dependency/Aggregator
- java中有关链表的用法
- Spark-partitioner
- Python文件编码的声明方法
- Spark-futureAction
- Android开发中的设计模式—单例模式的详细解释
- getMeasuredWidth()、getLayoutParams().getWidth()、getWidth()的区别
- 【课外作业】二维双向链表练习代码
- Android四大组件之一Service介绍-android学习之旅(十二)
- 0521开始学习打卡
- Java中集合类初探
- 第三章第32题
- js弹窗,div弹窗效果