Skip to content

Commit

Permalink
cleanup a topology
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Marz committed Oct 23, 2011
1 parent c2919ad commit b4d90cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jvm/storm/starter/BasicDRPCTopology.java
Expand Up @@ -48,9 +48,8 @@ public static void main(String[] args) throws Exception {
builder.addBolt(new ExclaimBolt(), 3);

Config conf = new Config();
conf.setDebug(true);

if(args.length==0) {
if(args==null || args.length==0) {
LocalDRPC drpc = new LocalDRPC();
LocalCluster cluster = new LocalCluster();

Expand All @@ -60,6 +59,9 @@ public static void main(String[] args) throws Exception {
System.out.println("Result for \"" + word + "\": "
+ drpc.execute("exclamation", word));
}

cluster.shutdown();
drpc.shutdown();
} else {
conf.setNumWorkers(3);
StormSubmitter.submitTopology(args[0], conf, builder.createRemoteTopology());
Expand Down

0 comments on commit b4d90cb

Please sign in to comment.