[FLINK-3045] Properly expose the key of a Kafka message#1385
[FLINK-3045] Properly expose the key of a Kafka message#1385rmetzger wants to merge 1 commit intoapache:masterfrom
Conversation
|
Looks quite good. I was wondering whether the KeyedSerializationSchema should have two methods, one to serialize key, one to serialize the value. That way one does not need this Tuple2 charade, and it looks more natural to Scala users as well... |
|
Thank you for the review. I'll change the |
|
It is a new feature in some sense, but it does not break anything, so probably no harm in adding it to 0.10.1 as well... |
|
I agree. Its a new feature and under normal circumstances we would not add this to a bugfix release. I've changed the KeyedSerializationSchema. |
|
Looks good, we should harmonize the generic types of |
|
+1 from me as well |
|
Thank you for the review. I'll merge the PR. Afterwards, I'll open a PR for harmonizing the |
The current Kafka connector does not allow users to access the message key.
With this change, I've added a new pair of serialization schemas (
KeyedDeserializationSchemaandKeyedSerializationSchema) a utiliy to create Kafka serializers from Flink's TypeInformation system:TypeInformationKeyValueSerializationSchema.I tried to make this change not API breaking.