第19课:Spark Streaming架构设计和运行机制大总结

来源:互联网 发布:号码滚动抽奖软件 编辑:程序博客网 时间:2024/06/06 19:02

第19课:Spark Streaming架构设计和运行机制大总结

1 spark streaming中的架构设计和运行机制
2 spark streaming的深度思考

Rdd的模板是Dstream,但Dstream操作和RDD不是一一对应的,Dstream和DstreamGraph 不过是幻象。


Spark Streaming本质上RDD+Timer,在RDD的基础之上,Timer在时间驱动下不断循环,周而复始的接收数据处理数据。

recurringTimer

 
 /**
 * Repeatedly call the callback every interval.
 */
private def loop() {
  try {
    while (!stopped) {
      triggerActionForNextInterval()
    }
    triggerActionForNextInterval()
  } catch {
    case e: InterruptedException =>
  }
}

0 0
原创粉丝点击