For solving your problem you should maintain trident state! without it no solution in trident .i was faced same problem! Thanks & Regard's Prasad.ch
From: [email protected] Date: Tue, 2 Jun 2015 16:55:09 -0400 Subject: Trident Not Counting Properly To: [email protected] Hi All , Can someone please help me why trident is printing count separately for same account Please see below for the account 01524655555 instead of printing total as 21 it is printing total in 2 steps 4 and 17 [01822777777, 21][01959111111, 20][01697799999, 21][05051111111, 21][01524655555, 17][01209222222, 21][01723888888, 21][01339500000, 21][01524655555, 4] TridentTopology topology = new TridentTopology(); topology.newStream("cdrevent", new CSVSpout("C:\\Users\\eassoni\\Downloads\\testdata.csv", ',', false)). groupBy(new Fields("field_1")) .aggregate(new Fields("field_1"), new Count(),new Fields("count")) .parallelismHint(5).each(new Fields("field_1","count"), new Utils.PrintFilter()).parallelismHint(5); Config config = new Config(); config.put(RichSpoutBatchExecutor.MAX_BATCH_SIZE_CONF, 100); LocalCluster cluster = new LocalCluster(); cluster.submitTopology("cdreventTopology", config, topology.build()); backtype.storm.utils.Utils.sleep(10000); cluster.killTopology("cdreventTopology");
