Thanks Srinath, I have already started using this approach. ( i.e
emitting multiple tuples , and doing field grouping in respective
bolts for my required string key).
Thought there could be some other way too.
On Wed, Mar 19, 2014 at 9:31 PM, Srinath C srinat...@gmail.com wrote:
You can have
You can have Bolt1 do:
public void execute(Tuple input) {
Class1 class1Instance = (Class1)input.getValueByField(JmsSpoutTuple);
collector.emit(new Values(class1Instance.class1Key1, class1Instance)); //
emit 2 values - class1Key1 and class1Instance
}
Then do field grouping for class1Key1 into
Anyone has any idea on this please ?
Thanks
On Mon, Mar 17, 2014 at 1:34 PM, Binita Bharati
binita.bhar...@gmail.com wrote:
Code sample :
Topology :
===
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(epd-spout,new MyJmsSpout());
Hi ,
I have a Bolt1 that emits a tuple of type a.b.c.MyClass1. MyClass1 has
a String field - class1Key1.
I need to segregate all tuples having same value for
a.b.c.MyClass1:class1Key1 into a specific task in another Bolt2.
How do I go about defining such a topology ? I have seen egs where
tuples
Code sample :
Topology :
===
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(epd-spout,new MyJmsSpout());
builder.setBolt(epd-CPY001-bolt1, new Bolt1(CPY001),
parallelismHintMap.get(CPY001))
.shuffleGrouping(epd-spout);