I tired to build a trident topology as the official trident tutorial told
http://storm.incubator.apache.org/documentation/Trident-tutorial.html

the code is simple, but I don’t have a cluster so I wanna run this topology 
with local cluster with a local drpc, but I don’t know how, any idea?

my code is here---------------
   TridentTopology topology;
        topology = new TridentTopology();

        TridentState wordCounts = topology.newStream("spout1", spout)
                .each(new Fields("sentence"), new Split(), new Fields("word"))
                .groupBy(new Fields("word"))
                .persistentAggregate(new MemoryMapState.Factory(), new Count(), 
new Fields("count"))
                .parallelismHint(10);

        topology.newDRPCStream("words")
                .each(new Fields("args"), new Split(), new Fields("word"))
                .groupBy(new Fields("word"))
                .stateQuery(wordCounts, new Fields("word"), new MapGet(), new 
Fields("count"))
                .each(new Fields("count"), new FilterNull())
                .aggregate(new Fields("count"), new Sum(), new Fields("sum"))

Reply via email to