1、自定义一个IMFEventLoop
2、自定义一个IMFEventLoopTest测试类运行结果
com.dt.spark.sparkstreaming.IMFEventLoopTest
=====IMF EventLoop from learn to give up !=========
IMFEventLoop的start调用onstart,unit
IMFEventLoop的构造函数启用了一个线程,eventThread.start()开始运行
IMF EventLoop :1
IMFEventLoop取得了event1
IMF EventLoop :2
IMFEventLoop的onReceive(event)1
IMF EventLoop :3
IMF EventLoop :4
IMF 处理启动的事件 1,例如spark.streaming.scheduler的JobScheduler.scala的JobStarted(job, startTime) => handleJobStart(job, startTime)
IMF EventLoop :5
IMF onReceive:1
IMF EventLoop :6
IMFEventLoop取得了event2
IMF EventLoop :7
IMFEventLoop的onReceive(event)2
IMF EventLoop :8
IMF 处理完成的事件 2 spark.streaming.scheduler的JobScheduler.scala的case JobCompleted(job, completedTime) => handleJobCompletion(job, completedTime)
