Examples of killTopology()


Examples of backtype.storm.LocalCluster.killTopology()

        if (args.length == 1) {
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("test", config, builder.createTopology());
            Thread.sleep(30000);
            cluster.killTopology("test");
            cluster.shutdown();
            System.exit(0);
        } else if (args.length == 2) {
            StormSubmitter.submitTopology(args[1], config, builder.createTopology());
        } else{
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

            while (!willExit()) {
                Utils.sleep(100);
            }

            cluster.killTopology(getTopologyName());
            cluster.shutdown();
        } else {
            LOGGER.info("submitting topology: " + getTopologyName());
            StormSubmitter.submitTopology(getTopologyName(), conf, topology);
            LOGGER.info("topology submitted: " + getTopologyName());
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        if (args.length == 0) {
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("test", config, builder.createTopology());
            Thread.sleep(10000);
            cluster.killTopology("test");
            cluster.shutdown();
            System.exit(0);
        } else {
            config.setNumWorkers(3);
            StormSubmitter.submitTopology(args[0], config, builder.createTopology());
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()

        Config conf = getConfig(args[0]);
        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("wordCounter", conf, buildTopology());
        Thread.sleep(60 * 1000);
        cluster.killTopology("wordCounter");

        cluster.shutdown();
    }

    private  static Config getConfig(String brokerConnectionString) {
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();
  }

  public static void runTopologyRemotely(StormTopology topology, String topologyName, Config conf)
      throws AlreadyAliveException, InvalidTopologyException {
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        if (args.length == 2) {
            LocalCluster cluster = new LocalCluster();

            cluster.submitTopology(TOPOLOGY_NAME, config, builder.createTopology());
            waitForSeconds(120);
            cluster.killTopology(TOPOLOGY_NAME);
            cluster.shutdown();
            System.exit(0);
        } else if (args.length == 3) {
            StormSubmitter.submitTopology(args[0], config, builder.createTopology());
        } else{
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        if (args.length == 1) {
            LocalCluster cluster = new LocalCluster();

            cluster.submitTopology(TOPOLOGY_NAME, config, builder.createTopology());
            waitForSeconds(120);
            cluster.killTopology(TOPOLOGY_NAME);
            cluster.shutdown();
            System.exit(0);
        } else if(args.length == 2) {
            StormSubmitter.submitTopology(args[1], config, builder.createTopology());
        }
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

   
    //Give a timeout period
    Utils.sleep(RUNTIME);
   
    //Kill the topology first
    cluster.killTopology("redditAnalyser");
   
    //Close the cluster
    cluster.shutdown();
   
  }
View Full Code Here

Examples of backtype.storm.LocalCluster.killTopology()

        if (args.length == 1) {
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("test", config, builder.createTopology());
            Thread.sleep(30000);
            cluster.killTopology("test");
            cluster.shutdown();
            System.exit(0);
        } else if (args.length == 2) {
            StormSubmitter.submitTopology(args[1], config, builder.createTopology());
        } else{
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.