Examples of submitTopology()


Examples of backtype.storm.LocalCluster.submitTopology()

        builder.setBolt(LOOKUP_BOLT, hBaseLookupBolt, 1).shuffleGrouping(WORD_SPOUT);
        builder.setBolt(TOTAL_COUNT_BOLT, totalBolt, 1).fieldsGrouping(LOOKUP_BOLT, new Fields("columnName"));

        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()

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

    LocalCluster cluster = new LocalCluster();
    cluster
        .submitTopology("hbase-example", stormConf, builder.createTopology());

    Utils.sleep(10000);
    cluster.shutdown();
  }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

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

    cluster.submitTopology("hbase-example", stormConfig,
        builder.buildTopology());

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

Examples of backtype.storm.LocalCluster.submitTopology()

        .groupBy(new Fields("shortid", "cf", "cq"))
        .persistentAggregate(state, new Count(), new Fields("count"));

    Config conf = new Config();
    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("hbase-trident-aggregate", conf, topology.build());

    Utils.sleep(5000);
    cluster.shutdown();
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

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

    LocalCluster cluster = new LocalCluster();
    cluster
        .submitTopology("hbase-example", stormConf, builder.createTopology());

    Utils.sleep(10000);
    cluster.shutdown();
  }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

        new Fields("shortid", "url", "user", "date"), new HBaseValueUpdater());

    Config conf = new Config();
    LocalCluster cluster = new LocalCluster();

    cluster.submitTopology("hbase-trident-updater", conf, topology.build());
    Utils.sleep(10000);
    cluster.shutdown();
  }
}
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

        Config conf = new Config();
        conf.setMaxSpoutPending(20);
        if(args.length==0) {
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("wordCounter", conf, buildTopology(drpc));
            for(int i=0; i<2; i++) {
                LOG.info("DRPC RESULT: " + drpc.execute("words", "dog the dog cat"));
                Thread.sleep(1000);
            }
            System.exit(0);
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

        Config conf = new Config();
        conf.setMaxSpoutPending(20);
        if(args.length==0) {
            LocalDRPC drpc = new LocalDRPC();
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("wordCounter", conf, buildTopology(drpc));
            for(int i=0; i<2; i++) {
                _spout.feed(new ArrayList(Arrays.asList("dog the the cat")));
                Thread.sleep(10000);
                LOG.info("DRPC RESULT: " + drpc.execute("words", "dog the dog cat"));
            }
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

        LocalDRPC drpc = new LocalDRPC();

        Config conf = new Config();
        LocalCluster cluster = new LocalCluster();
       
        cluster.submitTopology("reach", conf, buildTopology(drpc));
       
        Thread.sleep(2000);
       
        LOG.info("REACH: " + drpc.execute("reach", "aaa"));
        LOG.info("REACH: " + drpc.execute("reach", "foo.com/blog/1"));
View Full Code Here

Examples of backtype.storm.LocalCluster.submitTopology()

      conf.setNumAckers(numAckers);

      conf.setFallBackOnJavaSerialization(false);
      final LocalCluster cluster = new LocalCluster();
      startTime = System.currentTimeMillis();
      cluster.submitTopology(topologyName, conf, builder.createTopology());
    }
  }

  // if we are in local mode, we cannot obtain these information
  public static void writeStormStats(Map conf) {
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.