[
https://issues.apache.org/jira/browse/FLINK-35210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839816#comment-17839816
]
Martijn Visser commented on FLINK-35210:
----------------------------------------
There isn't enough information about used/tested versions of Flink, but I think
the actual solution should be fixing bugs (if there are any) instead of finding
workarounds like the one proposed in the ticket. It sounds trivial from the
start, but the moment you have to take things like new partitions being added
on a source that's already in use, this becomes less of an easy fix.
https://cwiki.apache.org/confluence/display/FLINK/FLIP-288%3A+Enable+Dynamic+Partition+Discovery+by+Default+in+Kafka+Source
already showed some considerations for those edge cases as well.
> Give the option to set automatically the parallelism of the KafkaSource to
> the number of kafka partitions
> ---------------------------------------------------------------------------------------------------------
>
> Key: FLINK-35210
> URL: https://issues.apache.org/jira/browse/FLINK-35210
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Kafka
> Reporter: Nicolas Perrin
> Priority: Minor
>
> Currently the setting of the `KafkaSource` Flink's operator parallelism needs
> to be manually chosen which can leads to highly skewed tasks if the developer
> doesn't do this job.
> To avoid this issue, I propose to:
> - retrieve dynamically the number of partitions of the topic using
> `KafkaConsumer.
> partitionsFor(topic).size()`,
> - set the parallelism of the stream built from the source based on this value.
> This way there won't be any idle tasks.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)