You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Mayur Mohite <ma...@vizury.com> on 2014/04/01 14:40:55 UTC

Only single task executing each bolt and spout

Hi,

We are trying to deploy a trident topology on a cluster of 3 machines.
However when we run this topology on a cluster, corresponding to each bolt
and spout there is exactly one task that is processing the tuples. Even
though we have set the parallelism hint > 1 at all the places in the
topology, several executors and tasks are created but the tuples are
processed by exactly 1 task for each spout and bolt.

The topology code is as follows -

        config.setNumWorkers(8);
        config.setMaxSpoutPending(10000);

        TridentKafkaConfig kafkaConfig = new
TridentKafkaConfig(brokerHosts, "test", "storm");
        TransactionalTridentKafkaSpout sp = new
TransactionalTridentKafkaSpout(kafkaConfig);
        topology.newStream("kafka", sp)
                .parallelismHint(2)
                .each(new Fields("str") ,new ComputeAttributes(), new
Fields("d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "m1"))
.parallelismHint(4).groupBy(new Fields("d1", "d2", "d3","d4", "d5", "d6",
"d7"))
                .persistentAggregate (MysqlState.newFactory(mysqlconfig),
new Fields("d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "m1"),
new AggregateCountryLevelData(), new Fields("sum"))
                .parallelismHint(4);


-Mayur