ids are now strings
This commit is contained in:
parent
79acca7428
commit
52f8628709
|
@ -5,9 +5,9 @@ require 'examples/native/word_count_bolt'
|
|||
class ClusterWordCountTopology
|
||||
def start(base_class_path, env)
|
||||
builder = TopologyBuilder.new
|
||||
builder.setSpout(1, JRubySpout.new(base_class_path, "RandomSentenceSpout"), 5)
|
||||
builder.setBolt(2, JRubyBolt.new(base_class_path, "SplitSentenceBolt"), 4).shuffleGrouping(1)
|
||||
builder.setBolt(3, JRubyBolt.new(base_class_path, "WordCountBolt"), 4).fieldsGrouping(2, Fields.new("word"))
|
||||
builder.setSpout('1', JRubySpout.new(base_class_path, "RandomSentenceSpout"), 5)
|
||||
builder.setBolt('2', JRubyBolt.new(base_class_path, "SplitSentenceBolt"), 4).shuffleGrouping('1')
|
||||
builder.setBolt('3', JRubyBolt.new(base_class_path, "WordCountBolt"), 4).fieldsGrouping('2', Fields.new("word"))
|
||||
|
||||
conf = Config.new
|
||||
conf.setDebug(true)
|
||||
|
|
|
@ -7,9 +7,9 @@ class LocalExclamationTopology
|
|||
def start(base_class_path, env)
|
||||
builder = TopologyBuilder.new
|
||||
|
||||
builder.setSpout(1, TestWordSpout.new, 10)
|
||||
builder.setBolt(2, JRubyBolt.new(base_class_path, "ExclamationBolt"), 3).shuffleGrouping(1)
|
||||
builder.setBolt(3, JRubyBolt.new(base_class_path, "ExclamationBolt"), 2).shuffleGrouping(2)
|
||||
builder.setSpout('1', TestWordSpout.new, 10)
|
||||
builder.setBolt('2', JRubyBolt.new(base_class_path, "ExclamationBolt"), 3).shuffleGrouping('1')
|
||||
builder.setBolt('3', JRubyBolt.new(base_class_path, "ExclamationBolt"), 2).shuffleGrouping('2')
|
||||
|
||||
conf = Config.new
|
||||
conf.setDebug(true)
|
||||
|
|
|
@ -21,9 +21,9 @@ class LocalExclamationTopology2
|
|||
def start(base_class_path, env)
|
||||
builder = TopologyBuilder.new
|
||||
|
||||
builder.setSpout(1, TestWordSpout.new, 10)
|
||||
builder.setBolt(2, JRubyBolt.new(base_class_path, "ExclamationBolt2"), 3).shuffleGrouping(1)
|
||||
builder.setBolt(3, JRubyBolt.new(base_class_path, "ExclamationBolt2"), 2).shuffleGrouping(2)
|
||||
builder.setSpout('1', TestWordSpout.new, 10)
|
||||
builder.setBolt('2', JRubyBolt.new(base_class_path, "ExclamationBolt2"), 3).shuffleGrouping('1')
|
||||
builder.setBolt('3', JRubyBolt.new(base_class_path, "ExclamationBolt2"), 2).shuffleGrouping('2')
|
||||
|
||||
conf = Config.new
|
||||
conf.setDebug(true)
|
||||
|
|
|
@ -43,8 +43,8 @@ end
|
|||
class LocalRedisWordCountTopology
|
||||
def start(base_class_path, env)
|
||||
builder = TopologyBuilder.new
|
||||
builder.setSpout(1, JRubySpout.new(base_class_path, "RedisWordSpout"), 1)
|
||||
builder.setBolt(2, JRubyBolt.new(base_class_path, "WordCountBolt"), 3).fieldsGrouping(1, Fields.new("word"))
|
||||
builder.setSpout('1', JRubySpout.new(base_class_path, "RedisWordSpout"), 1)
|
||||
builder.setBolt('2', JRubyBolt.new(base_class_path, "WordCountBolt"), 3).fieldsGrouping('1', Fields.new("word"))
|
||||
|
||||
conf = Config.new
|
||||
conf.setDebug(true)
|
||||
|
|
|
@ -5,9 +5,9 @@ require 'examples/native/word_count_bolt'
|
|||
class LocalWordCountTopology
|
||||
def start(base_class_path, env)
|
||||
builder = TopologyBuilder.new
|
||||
builder.setSpout(1, JRubySpout.new(base_class_path, "RandomSentenceSpout"), 5)
|
||||
builder.setBolt(2, JRubyBolt.new(base_class_path, "SplitSentenceBolt"), 8).shuffleGrouping(1)
|
||||
builder.setBolt(3, JRubyBolt.new(base_class_path, "WordCountBolt"), 12).fieldsGrouping(2, Fields.new("word"))
|
||||
builder.setSpout('1', JRubySpout.new(base_class_path, "RandomSentenceSpout"), 5)
|
||||
builder.setBolt('2', JRubyBolt.new(base_class_path, "SplitSentenceBolt"), 8).shuffleGrouping('1')
|
||||
builder.setBolt('3', JRubyBolt.new(base_class_path, "WordCountBolt"), 12).fieldsGrouping('2', Fields.new("word"))
|
||||
|
||||
conf = Config.new
|
||||
conf.setDebug(true)
|
||||
|
|
Loading…
Reference in New Issue