fix examples
This commit is contained in:
parent
fc3bedc4d0
commit
0034f98c27
|
@ -11,7 +11,7 @@ class ExclamationTopology < RedStorm::SimpleTopology
|
|||
source TestWordSpout, :shuffle
|
||||
end
|
||||
|
||||
bolt ExclamationBolt, :id => :exclamation_bolt2, :parallelism => 2 do
|
||||
bolt ExclamationBolt, :id => :ignore, :parallelism => 2 do
|
||||
source ExclamationBolt, :shuffle
|
||||
end
|
||||
|
||||
|
|
|
@ -10,19 +10,19 @@ class SplitSentenceBolt < RedStorm::SimpleBolt
|
|||
# block declaration style no auto-emit
|
||||
#
|
||||
# on_receive :emit => false do |tuple|
|
||||
# tuple.getString(0).split(' ').each{|w| emit(w)}
|
||||
# tuple.getString(0).split(' ').each{|w| unanchored_emit(w)}
|
||||
# end
|
||||
|
||||
# alternate declaration style using on_receive method
|
||||
#
|
||||
# on_receive :emit => false
|
||||
# on_receive :emit => true
|
||||
# def on_receive(tuple)
|
||||
# tuple.getString(0).split(' ').map{|w| [w]}
|
||||
# end
|
||||
|
||||
# alternate declaration style using any specific method
|
||||
#
|
||||
# on_receive :my_method, :emit => false
|
||||
# on_receive :my_method, :emit => true
|
||||
# def my_method(tuple)
|
||||
# tuple.getString(0).split(' ').map{|w| [w]}
|
||||
# end
|
||||
|
|
Loading…
Reference in New Issue