The bolt base classes have a prepare method: https://storm.incubator.apache.org/apidocs/backtype/storm/topology/base/BaseBasicBolt.html
and the spout base classes have a similar activate method: https://storm.incubator.apache.org/apidocs/backtype/storm/topology/base/BaseRichSpout.html Is that sufficient for your needs or were you thinking of something different? Marc On Sun, Jun 01, 2014 at 04:47:03PM -0700, Chris Bedford wrote: > Hi there - > > I would like to set up some state that spouts and bolts share, and I'd like to > prepare this state when the StormTopology gets 'activated' on a worker. > > it would be great if the StormTopology had something like a prepare or open > method to indicate when it is starting. I looked but i could find no such > API. > Maybe I should submit an enhancement request ? > > Thanks in advance for your responses, > - Chris > > > > [ if anyone is curious, the shared state is for all my application code to > check or not check invariants. the invariant checking takes additional time, > so we don't want to do it in production.. but during testing/development it > helps catch bugs]. > > -- > Chris Bedford > > Founder & Lead Lackey > Build Lackey Labs: http://buildlackey.com > Go Grails!: http://blog.buildlackey.com > >