Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submitting a topology to Storm

Tags:

apache-storm

I have configured Storm on my machine. Zookeeper, Nimbus and Supervisor are running properly. Now I want to submit a topology to this storm. I am trying to use storm jar. but I am not able to submit it. Can anybody please give an example for this. It will be very helpful. Thanks in advance:)

like image 708
Mahi Singh Avatar asked Sep 19 '13 06:09

Mahi Singh


People also ask

How can topology be submitted to Apache Storm cluster?

2) Use StormSubmitter to submit the topology to the cluster. StormSubmitter takes as input the name of the topology, a configuration for the topology, and the topology itself. For example: Config conf = new Config(); conf.

What are Storm topologies?

To do realtime computation on Storm, you create what are called "topologies". A topology is a graph of computation. Each node in a topology contains processing logic, and links between nodes indicate how data should be passed around between nodes. Running a topology is straightforward.

How can Storm topology be prevented?

One way to do this is to kill the topology and resubmit it, but Storm provides a "rebalance" command that provides an easier way to do this. Rebalance will first deactivate the topology for the duration of the message timeout (overridable with the -w flag) and then redistribute the workers evenly around the cluster.


1 Answers

The answer is in the official documentation, and it is clear enough. Run storm jar path/to/allmycode.jar org.me.MyTopology arg1 arg2 arg3 (replace with your project name and arguments if any). Make sure you are using StormSubmitter object instead of LocalCluster.

like image 121
Munim Avatar answered Nov 15 '22 12:11

Munim