You should declare 2 streams. Bolt configuration can't be passed to the
declareoutput fields method call.

On Oct 16, 2016 1:47 PM, "Darsh" <darsh.pa...@gmail.com> wrote:

> 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
>

Reply via email to