flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9979) Support a custom FlinkKafkaPartitioner for a Kafka table sink factory
Date Wed, 01 Aug 2018 11:31:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565164#comment-16565164

ASF GitHub Bot commented on FLINK-9979:

twalthr commented on a change in pull request #6440: [FLINK-9979] [table] Support a FlinkKafkaPartitioner
for Kafka table sink factory
URL: https://github.com/apache/flink/pull/6440#discussion_r206844236

 File path: flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaTableSourceSinkFactoryBase.java
 @@ -314,9 +322,24 @@ private StartupOptions getStartupOptions(
 		return options;
-	private FlinkKafkaPartitioner<Row> getFlinkKafkaPartitioner() {
-		// we don't support custom partitioner so far
-		return new FlinkFixedPartitioner<>();
+	@SuppressWarnings("unchecked")
+	private Optional<FlinkKafkaPartitioner<Row>> getFlinkKafkaPartitioner(DescriptorProperties
descriptorProperties) {
+		return descriptorProperties
+			.flatMap((String partitionerString) -> {
+				switch (partitionerString) {
 Review comment:
   Currently, we don't support the definition of keys and thus we don't support `KeyedDeserializationSchema`.
I will open a follow-up issue for this. I guess it would require a new type of format that
takes two nested formats for `key` and `value`.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Support a custom FlinkKafkaPartitioner for a Kafka table sink factory
> ---------------------------------------------------------------------
>                 Key: FLINK-9979
>                 URL: https://issues.apache.org/jira/browse/FLINK-9979
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API &amp; SQL
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>            Priority: Major
>              Labels: pull-request-available
> Currently, the Kafka table sink factory does not support a custom FlinkKafkaPartitioner.
However, this is needed for many use cases.

This message was sent by Atlassian JIRA

View raw message