0

例如

        topology.newStream("process", new RawDataSpout())
                .parallelismHint(1)
                .shuffle()
                .each(new Fields("frameID"), new RawToRgb(), new Fields("frameIDRawToRgbCompleted"))
                .parallelismHint(1)
                .shuffle()
                .each(new Fields("frameID", "frameIDRawToRgbCompleted"), new StereoInit(), new Fields("frameIDInitCompleted"))
                .parallelismHint(1)
                .setMemoryLoad(6144)
                .shuffle()
                .each(new Fields("frameID", "frameIDRawToRgbCompleted", "frameIDInitCompleted"), new StereoRing(), new Fields("frameIDRingCompleted"))
                .parallelismHint(1)
                .shuffle()
                .each(new Fields("frameID", "frameIDRawToRgbCompleted", "frameIDInitCompleted", "frameIDRingCompleted"), new Rendering(), new Fields("frameIDRenderingCompleted"))
                .parallelismHint(1)
                .setMemoryLoad(6144);

如上面的代码,一台主机可以同时运行 StereoInit 和 Rendering 吗?

4

1 回答 1

0

是的。但默认情况下不保证。

我要强制执行此操作,您需要提供自定义调度程序。示例:https ://github.com/xumingming/storm-lib/blob/master/src/jvm/storm/DemoScheduler.java

于 2016-08-25T09:48:32.573 回答