风暴计划没有运行

时间:2016-12-22 15:29:50

标签: apache-storm

所以我试图学习apache风暴,并使用tutorialspoint指南作为处理我的第一个风暴计划的参考点(https://www.tutorialspoint.com/apache_storm/apache_storm_quick_guide.htm

我没有按预期获得呼叫日志计数输出。然而,我的动物园管理员关闭了

我的拓扑结构是:

public class logAnalyserStorm {
public static void main(String[] args) throws InterruptedException{
    Config config = new Config();
    config.setDebug(true);

    TopologyBuilder builder = new TopologyBuilder();
    builder.setSpout("call-log-reader-spout", new FakeCallLogGeneratorSpout(),100);

    builder.setBolt("call-log-creator-bolt", new callLogCreatorBolt()).shuffleGrouping("call-log-reader-spout");

    builder.setBolt("call-log-counter-bolt", new callLogCounterBolt()).fieldsGrouping("call-log-creator-bolt", new Fields("call"));

    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("logAnalyserStorm", config, builder.createTopology());

    Thread.sleep(10000);
    cluster.killTopology("logAnalyserStorm");

    cluster.shutdown();

}

}

错误是:

20680 [Thread-10] INFO  o.a.s.event - Event manager interrupted
20683 [main] INFO  o.a.s.testing - Shutting down in process zookeeper
20683 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] INFO  o.a.s.s.o.a.z.s.NIOServerCnxnFactory - NIOServerCnxn factory exited run method

2 个答案:

答案 0 :(得分:0)

我意识到我的灵气没有运行。啊。谢谢

答案 1 :(得分:0)

更改Thread.sleep(10000); to Thread.sleep(60000);