storm拓扑是否可以包含循环?

xriantvc  于 2021-06-24  发布在  Storm
关注(0)|答案(1)|浏览(344)

我最近一直在看有关Apache风暴的报纸。据我所知,它是基于操作和数据流的有向无环图。
然而,在storm@twitter 上面写着:
请注意,风暴拓扑可以有循环。
它如何适用于dag的定义?

mwecs4sa

mwecs4sa1#

风暴不会阻止你在你的拓扑中循环。例子:

builder.setSpout("word", new TestWordSpout(), 10);
builder.setBolt("exclaim1", new ExclamationBolt(), 3)
    .shuffleGrouping("word")
    .shuffleGrouping("exclaim2");
builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGrouping("exclaim1");

另请参见https://groups.google.com/forum/#!topic/storm用户/ejn1hu58q\u 8。自行车似乎不是个好主意,如果它们被普遍使用,我会感到惊讶。

相关问题