风暴localcluster无法加载Bolt

时间:2016-07-14 12:53:53

标签: java maven apache-storm

我试图调试非常简单的拓扑(1个喷口1螺栓)

let configuration = ParseClientConfiguration {
    $0.applicationId = "YOUR NEW APP ID"
    $0.server = "http://example.com/parse"
}
Parse.initialize(with: configuration)

}

但是当我从InteliJ IDEA运行时,我得到:

  

java.lang.RuntimeException:java.lang.ClassNotFoundException:com.pixonic.zephyr.compaction.tests.Bolt1       在org.apache.storm.utils.Utils.javaDeserialize(Utils.java:181)〜[storm-core-1.0.1.jar:1.0.1]       在org.apache.storm.utils.Utils.getSetComponentObject(Utils.java:430)〜[storm-core-1.0.1.jar:1.0.1]

  

[Thread-15] ERROR o.a.s.d.worker - 服务器mk-worker的初始化错误   java.lang.RuntimeException:java.lang.ClassNotFoundException:org.apache.storm.daemon.acker       在org.apache.storm.utils.Utils.javaDeserialize(Utils.java:181)〜[storm-core-1.0.1.jar:1.0.1]       在org.apache.storm.utils.Utils.getSetComponentObject(Utils.java:430)〜[storm-core-1.0.1.jar:1.0.1]

但相同的拓扑在群集模式下运行良好。 调试模式下我的pom.xml中的PS有:

public class JoinerTopologyTest {

public static void main(String[] args) throws IOException {
    Config conf = new Config();
    conf.setNumWorkers(5);
    conf.setDebug(true);

    TopologyBuilder builder = new TopologyBuilder();
    builder.setSpout("SPOUT-1",new MySpout(),1);
    builder.setBolt("BOLT-1",new Bolt1(), 3)
            .shuffleGrouping("SPOUT-1");
    //builder.setBolt("JOINER", new JoinerBolt(),1)
    //        .shuffleGrouping("BOLT-1")
    //        .shuffleGrouping("SPOUT-1","str1");

    final LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("TOPO1",conf,builder.createTopology());


    System.in.read();

    cluster.shutdown();
}

修改

重现错误的项目:https://github.com/holinov/storm-101-localcluster/tree/master

1 个答案:

答案 0 :(得分:0)

按照评论中的要求将其发布在此处

<强>解决

要在IDEA中运行或调试拓扑,请不要使用maven runner。 右键单击拓扑类,然后选择Debug-&gt; JoinerTopologyTest ...没有MVN图标的main()