Examples of FakeTweetsBatchSpout


Examples of com.datasalt.trident.FakeTweetsBatchSpout

      return filter;
    }
  }

  public static StormTopology buildTopology(LocalDRPC drpc) throws IOException {
    FakeTweetsBatchSpout spout = new FakeTweetsBatchSpout();

    TridentTopology topology = new TridentTopology();
    topology.newStream("spout", spout)
        .parallelismHint(2)
        .partitionBy(new Fields("actor"))
View Full Code Here

Examples of com.datasalt.trident.FakeTweetsBatchSpout

      collector.emit(new Values(val));
    }
  }
 
  public static StormTopology buildTopology(LocalDRPC drpc) throws IOException {
    FakeTweetsBatchSpout spout = new FakeTweetsBatchSpout(100);

    TridentTopology topology = new TridentTopology();
    topology.newStream("spout", spout)
      .aggregate(new Fields("location"), new LocationAggregator(), new Fields("location_counts"))
      .each(new Fields("location_counts"), new Utils.PrintFilter());
View Full Code Here

Examples of com.datasalt.trident.FakeTweetsBatchSpout

* @author pere
*/
public class PerLocationCounts2 {

  public static StormTopology buildTopology(LocalDRPC drpc) throws IOException {
    FakeTweetsBatchSpout spout = new FakeTweetsBatchSpout(100);

    TridentTopology topology = new TridentTopology();
    topology.newStream("spout", spout)
      .groupBy(new Fields("location"))
      .aggregate(new Fields("location"), new Count(), new Fields("count"))
View Full Code Here

Examples of tutorial.storm.trident.testutil.FakeTweetsBatchSpout

        // Submits the topology
        String topologyName = args[0];
        conf.setNumWorkers(8); // Our Vagrant environment has 8 workers

        FakeTweetsBatchSpout fakeTweets = new FakeTweetsBatchSpout(10);

        TridentTopology topology = new TridentTopology();
        TridentState countState =
                topology
                        .newStream("spout", fakeTweets)
View Full Code Here

Examples of tutorial.storm.trident.testutil.FakeTweetsBatchSpout

        // Storm can be run locally for testing purposes
        Config conf = new Config();
//        conf.put(Config.TOPOLOGY_DEBUG,true);

        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("basic_primitives", conf, basicPrimitives(new FakeTweetsBatchSpout()));
        Thread.sleep(100000);
    }
View Full Code Here

Examples of tutorial.storm.trident.testutil.FakeTweetsBatchSpout

    public static void main(String[] args) throws Exception {
        Config conf = new Config();
//        conf.put(Config.TOPOLOGY_DEBUG,true);
        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("advanced_primitives", conf, advancedPrimitives(new FakeTweetsBatchSpout(1000)));
        Thread.sleep(30000);
        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.