You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Mohammed Manna <ma...@gmail.com> on 2017/05/23 16:41:32 UTC

Server Property num.partitions and Specification of Topic Paritions on Console

Hello,

I wanted to understand the relationship between the number of partitions in
default specification (server.properties) and topic specification. If I do
the following:


kafka-topics --create --zookeeper localhost:2181 --replication-factor 3
--partitions 3 --topic myTopic

It will actually *overwrite* the default partition number (num.partitions)
provided in the respective server.properties file (if server.properties
file have a smaller value). Otherwise, it will throw some kind of error
since the minimum number of partitions (num.partitions) is greater than the
topic specification (--partitions).

Is that correct?

Kindest Regards,

Re: Server Property num.partitions and Specification of Topic Paritions on Console

Posted by Girish Aher <gi...@gmail.com>.
The server property of num.partitions is the default value used when
auto.create.topics.enable=true.
If you are creating topics using a utility like kafka-topics, then what you
provide with that utility is what is used for topic creation irrespective
of whether it is less than or more than the server property of
num.partitions.

On Tue, May 23, 2017 at 9:41 AM, Mohammed Manna <ma...@gmail.com> wrote:

> Hello,
>
> I wanted to understand the relationship between the number of partitions in
> default specification (server.properties) and topic specification. If I do
> the following:
>
>
> kafka-topics --create --zookeeper localhost:2181 --replication-factor 3
> --partitions 3 --topic myTopic
>
> It will actually *overwrite* the default partition number (num.partitions)
> provided in the respective server.properties file (if server.properties
> file have a smaller value). Otherwise, it will throw some kind of error
> since the minimum number of partitions (num.partitions) is greater than the
> topic specification (--partitions).
>
> Is that correct?
>
> Kindest Regards,
>