Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build and Run Storm Topology within Intellij IDEA

I followed Storm Starter instructions and imported Twitter Storm in IntelliJ. For sake of testing I edited ExclaimationToplogy a bit and used following Maven command to build and run it:

mvn -f m2-pom.xml compile exec:java -Dstorm.topology=storm.starter.ExclamationTopology

But I am more interested to build and run within IDE rather than from command line. What actions do I need to perform?

Thanks

like image 452
Volatil3 Avatar asked Jan 18 '14 14:01

Volatil3


People also ask

How do you run a storm topology locally?

To install Storm locally, download a release from here and unzip it somewhere on your computer. Then add the unpacked bin/ directory onto your PATH and make sure the bin/storm script is executable. Installing a Storm release locally is only for interacting with remote clusters.

What is topology in Apache Storm?

The Storm topology is basically a Thrift structure. TopologyBuilder class provides simple and easy methods to create complex topologies. The TopologyBuilder class has methods to set spout (setSpout) and to set bolt (setBolt). Finally, TopologyBuilder has createTopology to create topology.


1 Answers

  1. Follow the steps in storm-starter's: Using storm-starter with IntelliJ IDEA
  2. Open Maven's pom.xml file and remove <scope>provided</scope> line from storm dependency. This enables IntelliJ to compile storm dependency on build.
  3. Go to /src/jvm/storm/starter/, right click on ExclamationTopology file and Run 'ExclamationTop....main()'
like image 129
Lukas Hajdu Avatar answered Sep 30 '22 03:09

Lukas Hajdu