Isn't the cleanup method guaranteed to be called only while running as local topology? On May 13, 2015 9:20 AM, "Jeffery Maass" <maas...@gmail.com> wrote:
> Bolts which implement IBolt have a method called cleanup() which is called > by the Storm framework. > > https://storm.apache.org/apidocs/backtype/storm/task/IBolt.html > > It is not guaranteed to be called, but then again, neither is any custom > code you write to perform the same functionality. > > > Thank you for your time! > > +++++++++++++++++++++ > Jeff Maass <maas...@gmail.com> > linkedin.com/in/jeffmaass > stackoverflow.com/users/373418/maassql > +++++++++++++++++++++ > > > On Wed, May 13, 2015 at 6:23 AM, Richards Peter <hbkricha...@gmail.com> > wrote: > >> Hi, >> >> I am using storm-0.8.2 in my system. My project, based on storm, opens >> connections to database/cache-server from spout/bolts. I need some of the >> connections to remain open till the topologies are active. However I would >> like to release these open connections from spout/bolt code when I kill my >> topology. >> >> Could you please tell me how the resources(cache-server or database >> connections) in bolts/spouts can be released using storm 0.9.3 and higher >> versions? >> >> I am planning to upgrade storm, used in my project, to storm-0.9.4 for >> various reasons. If I can release resources (cache-server or database >> connections) from spout and bolt, it would another good reason for storm >> upgrade. >> >> Thanks, >> Richards Peter. >> > >