I am trying to submit a topology to my STORM cluster and I am getting the following error on running mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building storm-starter 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ storm-starter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ storm-starter ---
[INFO] Compiling 15 source files to /Users/sharath/workspace/storm/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/sharath/workspace/storm/src/jvm/storm/starter/CustomToplogy.java:[41,35] unreported exception backtype.storm.generated.AlreadyAliveException; must be caught or declared to be thrown
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.396 s
[INFO] Finished at: 2014-08-19T20:35:37+05:30
[INFO] Final Memory: 17M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project storm-starter: Compilation failure
[ERROR] /Users/sharath/workspace/storm/src/jvm/storm/starter/CustomToplogy.java:[41,35] unreported exception backtype.storm.generated.AlreadyAliveException; must be caught or declared to be thrown
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I did some research and found out that the error occurs if a topology with the same name already exists on the cluster. But I queried STORM and found that no such topology exists.
Can someone help me understand what is going on? The code for the topology is below..
package storm.starter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.utils.Utils;
import storm.starter.spout.Spout;
import storm.starter.bolt.RedisBolt;
import java.util.*;
import backtype.storm.StormSubmitter;
public class CustomTopology {
public static void main(String[] args) {
TopologyBuilder builder = new TopologyBuilder();
//List<String> hosts = new ArrayList<String>();
//String host = args[0];
String broker = "tcp://192.168.5.102:1443";
String client = "test_client";
String topic = "#";
String redis_host = "192.168.5.102:6379";
//hosts.add(host);
builder.setSpout(...); //Omitted for security
builder.setBolt(...); //Omitted for security
Config conf = new Config();
conf.setDebug(true);
if (args != null && args.length > 0) {
conf.setNumWorkers(3);
StormSubmitter.submitTopology(args[0], conf, builder.createTopology());
}
else {
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("CustomT1", conf, builder.createTopology());
Utils.sleep(10000);
cluster.killTopology("CustomT1");
cluster.shutdown();
}
}
}
I setup my storm infrastructure using https://github.com/miguno/wirbelsturm