storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred Miller" <>
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
 bolt TestBolt2 < RedStorm::DSL::Bolt

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

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

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

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,

View raw message