Examples of submitTopology()


Examples of backtype.storm.LocalCluster.submitTopology()

                .shuffleGrouping(SENTENCE_SPOUT_ID);

        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) {
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()


        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) {
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

   
    //Create a local cluster
    LocalCluster cluster = new LocalCluster();
   
    //Submit the topology to the cluster for execution
    cluster.submitTopology("redditAnalyser", conf, builder.createTopology());
   
    //Give a timeout period
    Utils.sleep(RUNTIME);
   
    //Kill the topology first
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

        builder.setBolt(HBASE_BOLT, hbase, 1).fieldsGrouping(COUNT_BOLT, new Fields("word"));


        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) {
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

    public static void main(String[] args) throws Exception {
        Config conf = new Config();
        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);
        }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

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

Examples of backtype.storm.LocalCluster.submitTopology()

    Config config = new Config();
    config.setDebug(true);
    config.setMaxSpoutPending(3);

    cluster.submitTopology("top-n-topology", config, builder.buildTopology());

    Thread.sleep(3000);
    cluster.shutdown();
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

    }
    else {
      conf.setMaxTaskParallelism(3);

      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("word-count", conf, builder.createTopology());

      Thread.sleep(10000);

      cluster.shutdown();
    }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

    builder.setBolt("exclaim", new ExclamationBolt(), 3).shuffleGrouping("drpc");
    builder.setBolt("return", new ReturnResults(), 3).shuffleGrouping("exclaim");

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

    System.out.println(drpc.execute("exclamation", "aaa"));
    System.out.println(drpc.execute("exclamation", "bbb"));

  }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

    Config config = new Config();
    config.setDebug(true);
    config.setMaxSpoutPending(3);

    cluster.submitTopology("global-count-topology", config, builder.buildTopology());

    Thread.sleep(3000);
    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.