Execution flow of a storm program

◇◆丶佛笑我妖孽 提交于 2019-12-05 10:09:43

First, when your topology is started...

  1. Create Spouts and Bolts
  2. declareOutputFields
  3. Spouts/Bolts serialized and assigned to workers

Second, in each worker somewhere on the cluster...

  1. Spouts open and Bolts prepare (happens once)
  2. In a loop...
    • Spouts call ack, fail, and nextTuple
    • Bolts call execute

If your topology is deactivated...

  • Your spouts deactivate method will be called. When you activate the topology again then activate will be called.

If your topology is killed...

  • Spouts might have close called
  • Bolts might have cleanup called

Note:

There is no guarentee that close will be called, because the supervisor kill -9's worker processes on the cluster. source

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!