Hi,

using declareStream() does not necessary declare a direct stream. There
are 4 methods:

OutputFieldsDeclarer.declare(Fields)
OutputFieldsDeclarer.declare(boolean, Fields)
OutputFieldsDeclarer.declareStream(String, Fields)
OutputFieldsDeclarer.declareStream(String, boolean, Fields)

To declare a direct stream, you must use the methods with boolean
parameter and set it to true (otherwise you declare a "regular" stream).

The difference between declare() and declareStream() is, that you can
specify the name/ID of the stream using declareStream(). If you use
declare(), the stream get the name "default" (independent if you declare
it as regular or direct stream)

Furthermore, the is no performance difference between regular and direct
streams (or streams with default name vs use specified name).

(Internally, the first three methods just call the last method and add
boolean flag "false" and/or stream name "default".)

-Matthias


On 07/20/2015 05:42 PM, Nick R. Katsipoulakis wrote:
> Hello, 
> 
> I was wondering whether there is a performance gain if in the
> declareOutputFields() of my spouts/bolts I use declareStream() instead
> of declare()? In other words, if I give a hint to Storm that I am using
> direct streams instead of letting the runtime figure it out by itself,
> will I see better performance?
> 
> Thanks,
> Nikos
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to