the sample is only used for showing you how to use as a "sample". Better
use pool to manage the connection, and init the pool in the prepare method,
and get a connection in the execute method.

2014/1/17 Huang, Roger <[email protected]>

>  Daniel,
>
> Thanks for the info!
>
> -Roger
>
>
>
>
>
> *From:* Danijel Schiavuzzi [mailto:[email protected]]
> *Sent:* Thursday, January 16, 2014 4:14 AM
> *To:* [email protected]
> *Subject:* Re: experiences w/ storm-rdbms
>
>
>
> I think it's a good starting point to modify or use as a template for
> writing a bolt for your RDBMS.
>
> However, if I remember correctly from when I was researching it,
> storm-rdbms had a bug -- it opened the JDBC connection in the bolt's
> constructor instead of the prepare() method, so in case the bolt gets
> reassigned to another Storm worker, things might not work correctly
> (because all Storm components, such as spouts or bolts, are distributed
> around the cluster in a serialized form). It's safer to setup the database
> connection in the prepare() method, which gets called by Storm whenever a
> new bolt instance is started on the cluster.
>
> If you need a way to access relational databases from the Trident API,
> take a look at storm-mysql or trident-mssql projects on Github.
>
>
>
> Best regards,
>
> Danijel Schiavuzzi
> www.schiavuzzi.com
>
>
>
> On Wed, Jan 15, 2014 at 5:38 PM, Huang, Roger <[email protected]> wrote:
>
> Anyone have any experiences (pro/con) or tips for using storm-rdbms?
>
> https://github.com/nathanmarz/storm-contrib/tree/master/storm-rdbms
>
> thanks,
>
> Roger
>
>
>
>
>
>
> --
> Danijel Schiavuzzi
>

Reply via email to