From 52f8628709173f723e006ba108f744784bc96810 Mon Sep 17 00:00:00 2001 From: Colin Surprenant Date: Thu, 8 Dec 2011 13:50:36 -0500 Subject: [PATCH] ids are now strings --- examples/native/cluster_word_count_topology.rb | 6 +++--- examples/native/local_exclamation_topology.rb | 6 +++--- examples/native/local_exclamation_topology2.rb | 6 +++--- examples/native/local_redis_word_count_topology.rb | 4 ++-- examples/native/local_word_count_topology.rb | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/native/cluster_word_count_topology.rb b/examples/native/cluster_word_count_topology.rb index b710ea2..aecf424 100644 --- a/examples/native/cluster_word_count_topology.rb +++ b/examples/native/cluster_word_count_topology.rb @@ -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) diff --git a/examples/native/local_exclamation_topology.rb b/examples/native/local_exclamation_topology.rb index 0d0361c..3d53c9f 100644 --- a/examples/native/local_exclamation_topology.rb +++ b/examples/native/local_exclamation_topology.rb @@ -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) diff --git a/examples/native/local_exclamation_topology2.rb b/examples/native/local_exclamation_topology2.rb index 449d09e..736ba40 100644 --- a/examples/native/local_exclamation_topology2.rb +++ b/examples/native/local_exclamation_topology2.rb @@ -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) diff --git a/examples/native/local_redis_word_count_topology.rb b/examples/native/local_redis_word_count_topology.rb index b83edd0..da258fb 100644 --- a/examples/native/local_redis_word_count_topology.rb +++ b/examples/native/local_redis_word_count_topology.rb @@ -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) diff --git a/examples/native/local_word_count_topology.rb b/examples/native/local_word_count_topology.rb index c9bdc9e..cbf10b8 100644 --- a/examples/native/local_word_count_topology.rb +++ b/examples/native/local_word_count_topology.rb @@ -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)