Hi, Pinot creates initially the same number segmen...
# general
a
Hi, Pinot creates initially the same number segments as the number of a topic partition when ingesting a Kafka stream data to a table. Can I adjust the segment number instead of the topic partition number?
k
By adjusting, you mean fix the number of segments equal to number of partitions OR just append some number suffix?
a
If a topic has 100 partitions, can Pinot create just 20 segments when the table is initially created?
I mean, if a topic has 100 partitions, 100 partition consumers will be created, right? Can partition consumer numbers be adjusted?
k
No, that wont be possible. For lowLevel consumer, each partition is consumed independently of others and goes into a different segment.
We may be able to do in future with already added classes for PartitionGroups whereby few partitions can be mapped to a single consumer. Currently, though, there is no plan for doing that
k
Alice.. any reason why you want to do this?
You can always merge segments into bigger segments later
Maintaining one segment per partition has a lot of benefits
a
due to limited resources, cpus. If a topic has 100 partitions, I want to create 5 tables to consume the same topic, will 500 partition consumers be created? Any suggest I can refer to design my table?
Thanks, but how can I do this? To merge segments into bigger segments?
m
One way to merge them is once they're in an offline table you can use the merge rollup task - https://dev.startree.ai/docs/pinot/recipes/merge-small-segments
a
Ok, I’ll try. Thanks. @User
m
there's also a video explaining how it works in more detail -

https://www.youtube.com/watch?v=uYtLCQ07OcI

a
Thanks, that’s very helpful.
k
See real-time to offline minion task
m