You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/18 06:23:13 UTC

[GitHub] [flink] becketqin commented on a change in pull request #8535: [FLINK-11693] Add KafkaSerializationSchema that uses ProducerRecord

becketqin commented on a change in pull request #8535: [FLINK-11693] Add KafkaSerializationSchema that uses ProducerRecord
URL: https://github.com/apache/flink/pull/8535#discussion_r294625276
 
 

 ##########
 File path: flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java
 ##########
 @@ -495,6 +520,11 @@ public FlinkKafkaProducer(
 		this.schema = checkNotNull(serializationSchema, "serializationSchema is null");
 		this.producerConfig = checkNotNull(producerConfig, "producerConfig is null");
 		this.flinkKafkaPartitioner = checkNotNull(customPartitioner, "customPartitioner is null").orElse(null);
+		if (customPartitioner.isPresent()) {
 
 Review comment:
   Hmm, not sure if `KafkaSerializationSchema` can fully replace the partitioner. The current API does not provide number of partitions in `KafkaSerializationSchema.serialize()`, right? So the serializer will not be able to know the total number of partitions. Should we add that to the method arguments?

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


With regards,
Apache Git Services