How to build and run a Storm topology in Intellij IDEA

I followed the instructions of Storm Starter and imported Twitter Storm into IntelliJ. For testing, I edited ExclaimationToplogy a bit and used the following Maven command to create and run it:

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

But I'm more interested in creating and running inside the IDE, and not from the command line. What actions do I need to perform?

thanks

+6
java intellij-idea maven apache-storm
source share
2 answers
  • Follow the instructions in the stormtrooper: Using the assault launch with IntelliJ IDEA
  • Open the Maven pom.xml file and remove the <scope>provided</scope> from the storm dependency. This allows IntelliJ to compile the storm build dependency.
  • Go to /src/jvm/storm/starter/ , right-click on the ExclamationTopology file and Run 'ExclamationTop....main()'
+23
source share

Inside IntelliJ, if you get Clojure compiler related errors with LocalCluster , then ... first run mvn clean install -DskipTests from the command line in the same project. Then complete the "Restructuring Project" from IntelliJ. Life is full of secrets :-).

You also need to make sure that the storm rod is not in the provided for the storm starter.

0
source share

All Articles