Examples of killTopology()


Examples of backtype.storm.LocalCluster.killTopology()

        conf.setMaxSpoutPending(5);
        if (args.length == 1) {
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("wordCounter", conf, buildTopology(args[0]));
            Thread.sleep(60 * 1000);
            cluster.killTopology("wordCounter");
            cluster.shutdown();
            System.exit(0);
        }
        else if(args.length == 2) {
            conf.setNumWorkers(3);
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("karma-basic-topology",
         config,
         topology);
    Utils.sleep(60000);
    cluster.killTopology("karma-basic-topology");
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

  public static void runTopologyLocally(StormTopology topology, String topologyName, Config conf, int runtimeInSeconds)
      throws InterruptedException {
    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology(topologyName, conf, topology);
    Thread.sleep((long) runtimeInSeconds * MILLIS_IN_SEC);
    cluster.killTopology(topologyName);
    cluster.shutdown();
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

  public static void runTopologyLocally(StormTopology topology, String topologyName, Config conf, int runtimeInSeconds)
      throws InterruptedException {
    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology(topologyName, conf, topology);
    Thread.sleep((long) runtimeInSeconds * MILLIS_IN_SEC);
    cluster.killTopology(topologyName);
    cluster.shutdown();
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

    else {

      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("test", conf, builder.createTopology());
      Utils.sleep(10000);
      cluster.killTopology("test");
      cluster.shutdown();
    }
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        } else {
       
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("test", conf, builder.createTopology());
            Utils.sleep(10000);
            cluster.killTopology("test");
            cluster.shutdown();   
        }
    }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

    public static void runTopologyLocally(StormTopology topology, String topologyName, Config conf, int runtimeInSeconds)
            throws InterruptedException {
        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology(topologyName, conf, topology);
        Thread.sleep((long) runtimeInSeconds * MILLIS_IN_SEC);
        cluster.killTopology(topologyName);
        cluster.shutdown();
    }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        conf.setDebug(true);

        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("test", conf, builder.createTopology());
        Utils.sleep(120000);
        cluster.killTopology("test");
        cluster.shutdown();
    }

}
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("test", conf, builder.createTopology());

        // for testing, just leave up for 10 mins then kill it all
        Utils.sleep(10 * 60 * 1000); // 10 mins
        cluster.killTopology("test");
        cluster.shutdown();
    }

    private static IRichSpout createKafkaSpout() {

View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

      conf.setDebug(true);

      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("storm-jms-example", conf, builder.createTopology());
      Utils.sleep(60000);
      cluster.killTopology("storm-jms-example");
      cluster.shutdown();
    }
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.