The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IO::Storm::Spout - The base class for all IO::Storm Spout.

VERSION

version 0.17

NAME

IO::Storm::Spout - The base class for all IO::Storm Spout.

VERSION

version 0.06

METHODS

initialize

Called immediately after the initial handshake with Storm and before the main run loop. A good place to initialize connections to data sources.

ack

Called when a bolt acknowledges a tuple in the topology.

fail

Called when a tuple fails in the topology

A Spout can choose to emit the tuple again or ignore the fail. The default is to ignore.

next_tuple

Implement this function to emit tuples as necessary.

This function should not block, or Storm will think the spout is dead. Instead, let it return and streamparse will send a noop to storm, which lets it know the spout is functioning.

emit

Emit a spout tuple message.

:param tup: the tuple to send to Storm. Should contain only JSON-serializable data. :type tup: list :param tup_id: the ID for the tuple. Leave this blank for an unreliable emit. :type tup_id: str :param stream: ID of the stream this tuple should be emitted to. Leave empty to emit to the default stream. :type stream: str :param direct_task: the task to send the tuple to if performing a direct emit. :type direct_task: int

run

Main run loop for all spouts.

Performs initial handshake with Storm and reads tuples handing them off to subclasses. Any exceptions are caught and logged back to Storm prior to the Perl process exiting.

Subclasses should **not** override this method.

AUTHORS

  • Cory G Watson <gphat@cpan.org>

  • Dan Blanchard <dblanchard@ets.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

AUTHORS

  • Dan Blanchard <dblanchard@ets.org>

  • Cory G Watson <gphat@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Educational Testing Service.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.