Support Questions
Find answers, ask questions, and share your expertise

How can I submit an Apache Storm topology to a Storm production cluster?

How can I submit an Apache Storm topology to a Storm production cluster?

Explorer
 

I'm following this tutorial: https://docs.microsoft.com/en-us/azure/hdinsight/storm/apache-storm-develop-java-topology

What I've done so far is

  • maven setting
  • vi *.java files (in src/main/java/com/microsoft/example directory)
    • RandomSentenceSpout.java
    • SplitSentence.java
    • WordCount.java
    • WordCountTopology.java
  • mvn compile
  • jar cf storm.jar *.class (in target/classes/com/microsoft/example directory)
    • RandomSentenceSpout.class SplitSentence.class WordCount.class WordCountTopology.class
    • The above 4 files were used to make storm.jar file

Then, I tried

storm jar ./storm.jar com.microsoft.example.WordCountTopology WordCountTopology

and

storm jar ./storm.jar WordCountTopology

, but both of these failed, saying:

Error: Could not find or load main class com.microsoft.example.WordCountTopology

or

Error: Could not find or load main class WordCountTopology

According to a document, it says

Syntax: storm jar topology-jar-path class ...

Runs the main method of class with the specified arguments. The storm jars and configs in ~/.storm are put on the classpath. The process is configured so that StormSubmitter will upload the jar at topology-jar-path when the topology is submitted.

I cannot find where to fix.

How can I resolve this?

1 REPLY 1

Re: How can I submit an Apache Storm topology to a Storm production cluster?

Explorer

I solved this referring to https://storm.apache.org/releases/current/Running-topologies-on-a-production-cluster.html.

 

After editting pom.xml, I ran `mvn assembly:assembly`.

 

Then 

 

storm jar ./WordCount-1.0-SNAPSHOT.jar com.microsoft.example.WordCountTopology WordCountTopology