colinsurprenant/redstorm — Issue #10: Fields grouping must be declared with strings, not symbols
Author: iconara
Created: 2011-12-18 10:05:06+00:00
State: open

This topology code works

bolt UniqBolt do
source FriendsBolt, :fields => ['friend_id']
end

but this does not

bolt UniqBolt do
source FriendsBolt, :fields => [:friend_id]
end

the latter fails with the following message

1 [main] ERROR org.apache.zookeeper.server.NIOServerCnxn - Thread Thread[main,5,main] died
org.jruby.exceptions.RaiseException: (TypeError) can't define singleton
at org.jruby.RubyModule.extend_object(org/jruby/RubyModule.java:2066)
at #.define_grouping(/Users/theo/.rvm/gems/jruby-1.6.5@redstorm_demo/gems/redstorm-0.2.1/lib/red_storm/simple_topology.rb:40)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
at RedStorm::SimpleTopology::BoltDefinition.define_grouping(/Users/theo/.rvm/gems/jruby-1.6.5@redstorm_demo/gems/redstorm-0.2.1/lib/red_storm/simple_topology.rb:35)
at Topology.start(/Users/theo/.rvm/gems/jruby-1.6.5@redstorm_demo/gems/redstorm-0.2.1/lib/red_storm/simple_topology.rb:112)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
at RedStorm::SimpleTopology.start(/Users/theo/.rvm/gems/jruby-1.6.5@redstorm_demo/gems/redstorm-0.2.1/lib/red_storm/simple_topology.rb:109)
at #.main(/Users/theo/.rvm/gems/jruby-1.6.5@redstorm_demo/gems/redstorm-0.2.1/lib/red_storm/topology_launcher.rb:43)

Since fields are declared with symbols, it feels logical that it should be possible to refer to them using symbols too.