You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Raphael Hsieh <ra...@gmail.com> on 2014/04/29 00:40:28 UTC
Multiple writers to datastore ?
How does Storm handle multiple writers writing data to an external
datastore ? If there are multiple workers working to process the data, each
of them must also do the "write" to the database. If there are multiple
writers to the database that are storing data, how does it make sure that
the writers don't overwrite each others data ?
I understand that it will read from the datastore first and check the
batchTxId. However, if two writers look at a previous batchID, lets pretend
it's 26.
Now batch 27 and 28 want to write a continued aggregate data. 27 increments
on 26. 28 increments on 26. 27 writes first, then 28. However, 28 did not
aggregate on top of 27's aggregate, and hence the final data in the
datastore is wrong.
How does storm handle this ?
--
Raphael Hsieh
Re: Multiple writers to datastore ?
Posted by Nathan Leung <nc...@gmail.com>.
It depends on your specific application, but if you are modifying specific
rows based on an index you can do fields grouping by that index so that
only one bolt will ever update a particular row.
On Mon, Apr 28, 2014 at 6:40 PM, Raphael Hsieh <ra...@gmail.com> wrote:
> How does Storm handle multiple writers writing data to an external
> datastore ? If there are multiple workers working to process the data, each
> of them must also do the "write" to the database. If there are multiple
> writers to the database that are storing data, how does it make sure that
> the writers don't overwrite each others data ?
>
> I understand that it will read from the datastore first and check the
> batchTxId. However, if two writers look at a previous batchID, lets pretend
> it's 26.
> Now batch 27 and 28 want to write a continued aggregate data. 27
> increments on 26. 28 increments on 26. 27 writes first, then 28. However,
> 28 did not aggregate on top of 27's aggregate, and hence the final data in
> the datastore is wrong.
>
> How does storm handle this ?
>
> --
> Raphael Hsieh
>
>
>
>