You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Chandrashekhar Kotekar <sh...@gmail.com> on 2015/09/21 12:31:37 UTC

How to built trident topology which will persist tuples in HBase?

Hi,

I want to build a trident topology which will get tuples from Kafka, group
them by one field and persist entire grouped tuples in HBase. I have
written following code but not sure where should I write code which will
convert all tuples into HBase 'Put' type objects and persist all those Put
objects in HBase. Can anyone please help me?

        OpaqueTridentKafkaSpout kafkaTridentSpout = new
OpaqueTridentKafkaSpout(spoutConfig);
        TridentTopology topology = new TridentTopology();
        topology.newStream("stream", kafkaTridentSpout)
                                     .groupBy(new Fields("pointId"))
                                     .toStream();
        topology.build();

Regards,
Chandrash3khar Kotekar
Mobile - +91 8600011455