You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Sa Li <sa...@gmail.com> on 2014/06/26 22:15:37 UTC

print the twitter stream on bolts issue

Dear all

I grab the twitter data in spout and want to be able to write what I got into cassandra, now I hope to print out what the bolt emit before I write things into cassandra, how to do that? In addition, I create keyspaces and tables in cassandra (localhost), but seems not able to write the data in, anyone have the same problem?


thanks

Alec

Re: print the twitter stream on bolts issue

Posted by Sa Li <sa...@gmail.com>.
Thank you very much, Robert, will look into the examples first.

cheers

Alec
On Jun 26, 2014 2:16 PM, "Robert Lee" <le...@gmail.com> wrote:

> I'd suggest you check out some of the examples from this repository
> (within the src/test/java/com/hmsonline/trident/cql/example directory):
>
> https://github.com/hmsonline/storm-cassandra-cql
>
> I personally consume twitter from a kafka spout, process using storm
> trident, and then store the necessary information of my aggregation data
> into cassandra using a CassandraCqlMapState. If you just want to store each
> tweet into cassandra, consider just using the CassandraCqlState as there is
> no need for the backing map.
>
> If you run into more difficulty, send me an email privately as I helped in
> writing the code.
>
> Robert
>
>
> On Thu, Jun 26, 2014 at 4:15 PM, Sa Li <sa...@gmail.com> wrote:
>
>> Dear all
>>
>> I grab the twitter data in spout and want to be able to write what I got
>> into cassandra, now I hope to print out what the bolt emit before I write
>> things into cassandra, how to do that? In addition, I create keyspaces and
>> tables in cassandra (localhost), but seems not able to write the data in,
>> anyone have the same problem?
>>
>>
>> thanks
>>
>> Alec
>
>
>

Re: print the twitter stream on bolts issue

Posted by Robert Lee <le...@gmail.com>.
I'd suggest you check out some of the examples from this repository (within
the src/test/java/com/hmsonline/trident/cql/example directory):

https://github.com/hmsonline/storm-cassandra-cql

I personally consume twitter from a kafka spout, process using storm
trident, and then store the necessary information of my aggregation data
into cassandra using a CassandraCqlMapState. If you just want to store each
tweet into cassandra, consider just using the CassandraCqlState as there is
no need for the backing map.

If you run into more difficulty, send me an email privately as I helped in
writing the code.

Robert


On Thu, Jun 26, 2014 at 4:15 PM, Sa Li <sa...@gmail.com> wrote:

> Dear all
>
> I grab the twitter data in spout and want to be able to write what I got
> into cassandra, now I hope to print out what the bolt emit before I write
> things into cassandra, how to do that? In addition, I create keyspaces and
> tables in cassandra (localhost), but seems not able to write the data in,
> anyone have the same problem?
>
>
> thanks
>
> Alec