天天看點

storm 運作拓撲

Next, package the source into a jar, which is sent when you run the Storm Client command

to submit the topology. Because you used Maven, the only thing you need to do

is go to the source folder and run the following:

mvn package

Once you have the generated jar, use the storm jar command to submit the topology

(you should know how to install the Storm client into Appendix A). The syntax is 

storm jar allmycode.jar org.me.MyTopology arg1 arg2 arg3.

In this example, from the topologies source project folder, run:

storm jar target/Topologies-0.0.1-SNAPSHOT.jar countword.TopologyMain src/main/

resources/words.txt

With these commands, you have submitted the topology to the cluster.