Open cavities opened 8 years ago
.shuffleGrouping('spout1').shuffleGrouping('bolt1').shuffleGrouping('bolt2') ?
一般来说是 builder.setBolt("xxx1",new xxxbolt()).shuffleGrouping('aaaspout'); builder.setBolt("xxx2",new xxxbolt()).shuffleGrouping('aaaspout'); builder.setBolt("xxx3",new xxxbolt()).shuffleGrouping('aaaspout'); ... builder.setBolt("xxxN",new xxxbolt()).shuffleGrouping('aaaspout'); 这个是由 'aaaspout' 上获取数据 然后获取数据 现在要将这些bolt汇总;
buider.setBolt("join",new joinbolt()).shuffleGrouping('xxx1') .shuffleGrouping('xxx1') .shuffleGrouping('xxx2') .shuffleGrouping('xxx3') .... .shuffleGrouping('xxxn') 这样这个join要写非常多行就是想把这个简化 builder.setBolt("xxx1",new xxxbolt()).shuffleGrouping('aaaspout').xxx(指定发射的joinbolt); builder.setBolt("xxx2",new xxxbolt()).shuffleGrouping('aaaspout').xxx(指定发射的joinbolt); builder.setBolt("xxx3",new xxxbolt()).shuffleGrouping('aaaspout').xxx(指定发射的joinbolt); ... builder.setBolt("xxxN",new xxxbolt()).shuffleGrouping('aaaspout').xxx(指定发射的joinbolt); 然后在join节点 就可以很方便了;
@Allianzcortex
@cavities 现在没有办法, 就是这个样子, 当多个bolt消费同一个源时, 就是要写多行
多写2行代码,我觉得问题不大吧
请问下 怎么能够指定 spout 或者bolt 的下一个节点。 否则 ,如果 当有很多bolt需要指向一个bolt的情况下、bolt后头得跟上一堆的Grouping