You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on_receive method blocks should be able to yield a tuple, which would in turn get emitted. Right now, it looks like the current implementation will iterator through an array of tuple and emit them, however, aggregating them inside of the on_receive block might yield poor performance.
you can actually avoid the auto emit functionality by setting the :emit => false options to on_receive and "manually" call unanchored_emit or anchored_emit to emit your tuple from within the on_receive block.
example
class DemultiplexerBolt < RedStorm::SimpleBolt
on_receive :emit => false do |tuple|
tuple.getValueByField(:ids).each do |id|
unanchored_emit(tuple + [id])
end
end
end
does this work for you?
I do not really see how yielding tuples would significantly improve performance. What's your thought on this?
on_receive
method blocks should be able to yield a tuple, which would in turn get emitted. Right now, it looks like the current implementation will iterator through an array of tuple and emit them, however, aggregating them inside of the on_receive block might yield poor performance.Example:
(current form)
(proposed form)
Does anyone see any issues with updating the logic within SimpleBolt#execute to account for this?
The text was updated successfully, but these errors were encountered: