storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred Miller" <f...@frederickmiller.com>
Subject RedStorm: How to Add More than 1 JRubyShellBolt to a Topology
Date Tue, 29 Apr 2014 12:33:30 GMT

1. Using the shell_topology.rb example, it's not clear if we can have more 
than 1 JRubyShellBolt in the topology.
Whereas the bolt definitions for the JRuby bolts are clear:
 bolt TestBolt1 < RedStorm::DSL::Bolt
 ...
 end
 bolt TestBolt2 < RedStorm::DSL::Bolt
 ...
 end,

it's unclear how to create more than one JRubyShellBolt:

Per the example:
 bolt JRubyShellBolt, ["python", "splitsentence.py"] do
 output_fields "word"
 source SimpleSpout, :shuffle
 end

How would I do something like:
 bolt SplitSentence, ["python", "splitsentence.py"] do
 output_fields "word"
 source SimpleSpout, :shuffle
 end
 bolt SplitSentence2, ["python", "splitsentence.py"] do
 output_fields "word"
 source SplitSentence, :shuffle
 end

2. Doing the following will NOT work,
java_import 'readstorm.storm.jruby.JRubyShellBolt'
SplitSentence = JRubyShellBolt
SplitSentence2 = JRubyShellBolt

and results in: 

... duplicate id in Java::RedstormStormJruby::JRubyShellBolt on id=j_ruby_shell_bolt ...

because SplitSentence2 is a reference.

Thanks in advance,
Fred






Mime
View raw message