Thank you for the clarification! In fact, the config instance is our own file ...
Mingtao On Wed, Jul 23, 2014 at 7:57 PM, Guozhang Wang <wangg...@gmail.com> wrote: > num.partitions is only used as a default value when the createTopic command > does not specify the num.partitions or it is automatically created. In your > case since you always use its value in the createTopic you will always can > one partition. Try change your code to sth. like: > > String[] args = new String[]{ > "--zookeeper", config.getString("zookeeper"), > "--topic", config.getString("topic"), > "--replica", config.getString("replicas"), > "--partition", "8" > }; > > CreateTopicCommand.main(args); > > > > On Wed, Jul 23, 2014 at 4:38 PM, Mingtao Zhang <mail2ming...@gmail.com> > wrote: > > > Hi All, > > > > In kafka.properties, I put (forgot to change): > > > > num.partitions=1 > > > > While I create topics programatically: > > > > String[] args = new String[]{ > > "--zookeeper", config.getString("zookeeper"), > > "--topic", config.getString("topic"), > > "--replica", config.getString("replicas"), > > "--partition", config.getString("partitions") > > }; > > > > CreateTopicCommand.main(args); > > > > The performance engineer told me only one consumer thread is actively > > working even I have 4 consumer threads started (could see when debugging > or > > in thread dump); and 4 partitions configured from the args. > > > > It seems that num.partitions is still controlling the parallelism. Do I > > need to change this num.partitions accordingly? Could I remove it? What > is > > I have different parallel requirement for different topic? > > > > Thank you in advance! > > > > Best Regards, > > Mingtao > > > > > > -- > -- Guozhang >