@@ -0,0 +1,2129 @@
+package storm.benchmark.benchmarks;%0A%0Aimport backtype.storm.Config;%0Aimport backtype.storm.generated.StormTopology;%0Aimport backtype.storm.tuple.Fields;%0Aimport storm.benchmark.benchmarks.common.StormBenchmark;%0Aimport storm.benchmark.lib.spout.TridentFileReadSpout;%0Aimport storm.benchmark.util.BenchmarkUtils;%0Aimport storm.trident.TridentState;%0Aimport storm.trident.TridentTopology;%0Aimport storm.trident.operation.builtin.Count;%0Aimport storm.trident.testing.MemoryMapState;%0Aimport storm.trident.testing.Split;%0A%0Apublic class TridentFileReadWordCount extends StormBenchmark %7B%0A%0A    public static final String SPOUT_ID = %22spout%22;%0A    public static final String SPOUT_NUM = %22component.spout_num%22;%0A//    public static final String SPLIT_NUM = %22component.split_bolt_num%22;%0A    public static final String COUNT_NUM = %22component.count_bolt_num%22;%0A    public static final String BATCH_SIZE = %22trident.spout.batch.size%22;%0A%0A    public static final int DEFAULT_SPOUT_NUM = 8;%0A//    public static final int DEFAULT_SPLIT_BOLT_NUM = 4;%0A    public static final int DEFAULT_COUNT_BOLT_NUM = 4;%0A    public static final int DEFAULT_BATCH_SIZE = 1000;%0A%0A%0A    @Override%0A    public StormTopology getTopology(Config config) %7B%0A        final int spoutNum = BenchmarkUtils.getInt(config, SPOUT_NUM, DEFAULT_SPOUT_NUM);%0A//        final int splitNum = BenchmarkUtils.getInt(config, SPLIT_NUM, DEFAULT_SPLIT_BOLT_NUM);%0A        final int countNum = BenchmarkUtils.getInt(config, COUNT_NUM, DEFAULT_COUNT_BOLT_NUM);%0A        final int batchSize = BenchmarkUtils.getInt(config, BATCH_SIZE, DEFAULT_BATCH_SIZE);%0A%0A%0A        TridentTopology topology = new TridentTopology();%0A        TridentFileReadSpout spout = new TridentFileReadSpout(batchSize);%0A%0A        TridentState wordCounts = topology.newStream(%22spout1%22, spout)%0A                .parallelismHint(spoutNum)%0A                .each(new Fields(%22sentence%22), new Split(), new Fields(%22word%22))%0A                .groupBy(new Fields(%22word%22))%0A                .persistentAggregate(new MemoryMapState.Factory(), new Count(), new Fields(%22count%22))%0A                .parallelismHint(countNum);%0A%0A        return topology.build();%0A    %7D%0A%7D%0A

add Trident word count benchmark (without kafka)