Storm Execution Flow
- taolius
- Feb 13, 2017
- 1 min read
http://stackoverflow.com/questions/28981197/execution-flow-of-a-storm-program
http://storm.apache.org/releases/1.0.1/Tutorial.html
First, when your topology is started...
Create Spouts and Bolts
declareOutputFields
Spouts/Bolts serialized and assigned to workers
Second, in each worker somewhere on the cluster...
Spouts open and Bolts prepare (happens once)
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
Comments