示例#1
0
 class JavaWordCount(Topology):
     word_spout = WordSpout.spec(par=2)
     word_bolt = JavaBolt.spec(
         serialized_java=serialized_java,
         inputs={word_spout: Grouping.fields("word")},
         par=8,
         outputs=['word', 'count'])
示例#2
0
 class JavaWordCount(Topology):
     word_spout = WordSpout.spec(par=2)
     word_bolt = JavaBolt.spec(full_class_name='com.bar.foo.counter.WordCountBolt',
                               args_list=[u'foo', 1, b'\x09\x10', True,
                                          3.14159],
                               inputs={word_spout: Grouping.fields("word")},
                               par=8, outputs=['word', 'count'])
示例#3
0
 class JavaWordCount(Topology):
     word_spout = WordSpout.spec(par=2)
     word_bolt = JavaBolt.spec(
         full_class_name="com.bar.foo.counter.WordCountBolt",
         args_list=[u"foo", 1, b"\x09\x10", True, 3.14159],
         inputs={word_spout: Grouping.fields("word")},
         par=8,
         outputs=["word", "count"],
     )
示例#4
0
 class JavaWordCount(Topology):
     word_spout = WordSpout.spec(par=2)
     word_bolt = JavaBolt.spec(
         full_class_name="com.bar.foo.counter.WordCountBolt",
         args_list=[{"foo": "bar"}, 1],
         inputs={word_spout: Grouping.fields("word")},
         par=8,
         outputs=["word", "count"],
     )
示例#5
0
 class JavaWordCount(Topology):
     word_spout = WordSpout.spec(par=2)
     word_bolt = JavaBolt.spec(
         full_class_name='com.bar.foo.counter.WordCountBolt',
         args_list=[{
             'foo': 'bar'
         }, 1],
         inputs={word_spout: Grouping.fields("word")},
         par=8,
         outputs=['word', 'count'])