IO::Storm::Spout - The base class for all IO::Storm Spout.
version 0.17
version 0.06
Called immediately after the initial handshake with Storm and before the main run loop. A good place to initialize connections to data sources.
Called when a bolt acknowledges a tuple in the topology.
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.
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 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
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.
Cory G Watson <gphat@cpan.org>
Dan Blanchard <dblanchard@ets.org>
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.
This software is copyright (c) 2014 by Educational Testing Service.
To install IO::Storm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Storm
CPAN shell
perl -MCPAN -e shell install IO::Storm
For more information on module installation, please visit the detailed CPAN module installation guide.