一 、将eclipse中的工程,进行打包丢到服务器
(1).在maven工程pom.xml中加入(在服务器storm集群运行)
<scope>provided</scope>
即
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>1.1.0</version>
<scope>provided</scope>
</dependency>
(2).工程右键run as > run configuration
(3).maven build 右键new
(4).编辑jar打包信息
(5).打出来的jar包在target目录下
七、提交作业到storm集群来运行
(1)提交作业到storm集群
storm jar jar包名称 类名 参数(可多),回车
storm jar /usr/local/storm-wordcount-0.0.1-SNAPSHOT.jar com.kang.eshop.storm.WordCountTopology wordCountTopology
storm jar storm-wordcount-0.0.1-SNAPSHOT.jar com.kang.eshop.storm.WordCountTopology wordCountTopology
(2)在storm ui上观察storm作业的运行
http://139.199.10.125:8080/index.html
(3)kill掉某个storm作业
storm kill topology-name