storm如何本地运行

代码:

conf.setMaxTaskParallelism(1);
LocalCluster cluster = new LocalCluster();
              cluster.submitTopology("srslog", conf, builder.createTopology());
              Thread.sleep(180000);
              cluster.killTopology("storm-mobile1");
              cluster.shutdown();

运行报错:
storm java.lang.NoClassDefFoundError: scala/collection/GenTraversableOnce$class
解决办法

The collection API is different between Scala 2.10 and 2.11
Scala 2.10 - kafka_2.10-0.10.2.1
Scala 2.12 - kafka_2.12-0.10.2.1


org.scala-lang
scala-library
2.10.6

测试ok 从2.11 降低到2.10

你可能感兴趣的:(storm如何本地运行)