1 。查看storm中运行的 app
[root@hadoop1 apache-storm-1.2.1]# ./bin/storm list
2 。 storm 执行wordCount 例子:
./bin/storm jar examples/storm-starter/storm-starter-topologies-1.0.0.jar org.apache.storm.starter.WordCountTopology test
3 。 手动停止topology :
[[email protected]]# ./bin/storm kill test(test为topology定义的名称)
执行项目中出现的错误:
Exception in thread "main" java.lang.NoClassDefFoundError: storm/kafka/BrokerHosts
缺少jar包,往安装包中添加就可以了。
参考链接: