storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darsh <darsh.pa...@gmail.com>
Subject Is it possible to emit different number of OutputFields
Date Sun, 16 Oct 2016 20:47:22 GMT
Is it possible to emit different number of output fields from storm a bolt?

For ex:

public void declareOutputFields(OutputFieldsDeclarer declarer) {
     if(…)
         declarer.declare(new Fields(“ABC"));
     if(…)
         declarer.declare(new Fields(“XYZ”), new Fields(“QQQ");
  }



Or do I have to create 2 different streams ? Something like,

outputFieldsDeclarer.declareStream("stream1", new Fields("field1"));

outputFieldsDeclarer.declareStream("stream2", new Fields("field2"));





Thanks

Darsh

Mime
View raw message