IO::Storm - Perl support for Twitter's Storm
version 0.01
package SplitSentenceBolt;
use Moose;
extends 'Storm::BasicBolt';
sub process {
my ($self, $tuple) = @_;
my @words = split(' ', $tuple->values->[0]);
foreach my $word (@words) {
$self->emit([ $word ]);
}
}
SplitSentenceBolt->new->run;
IO::Storm allows you to leverage Storm's multilang support to write Bolts (and someday, more) in Perl.
Read a message from the ShellBolt. Reads until it finds a "end" line.
Read a message from the ShellBolt and decode it from JSON.
Sent a message to the ShellBolt, encoding it as JSON.
Send a message to the ShellBolt.
Send a sync.
Send this processes PID.
Send a tuple to the ShellBolt.
Emit a tuple to the the ShellBolt and return the response.
Emit a tuple to the Shell bolt, but do not get a response.
Acknowledge a tuple.
Fail a tuple.
Send a log command to the ShellBolt
Read the configuration and context from the ShellBolt.
Turn the incoming Tuple structure into an IO::Storm::Tuple.
Initialize this bolt.
Cory G Watson gphat@cpan.org
This software is copyright (c) 2011 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.