storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ambud Sharma <asharma52...@gmail.com>
Subject Re: Is it possible to emit different number of OutputFields
Date Mon, 17 Oct 2016 07:16:47 GMT
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.patil@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
>

Mime
View raw message