[ https://issues.apache.org/jira/browse/FLINK-8500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468546#comment-16468546 ]
ASF GitHub Bot commented on FLINK-8500: --------------------------------------- Github user dawidwys commented on a diff in the pull request: https://github.com/apache/flink/pull/5958#discussion_r186967673 --- Diff: flink-core/src/main/java/org/apache/flink/api/common/serialization/DeserializationSchema.java --- @@ -42,14 +42,22 @@ @Public public interface DeserializationSchema<T> extends Serializable, ResultTypeQueryable<T> { + /** + * @deprecated Use {@link #deserialize(ConsumerRecordMetaInfo)} . + */ + @Deprecated + T deserialize(byte[] message) throws IOException; + /** * Deserializes the byte message. * - * @param message The message, as a byte array. + * @param consumerRecordMetaInfossage The message, as a {@link ConsumerRecordMetaInfo}. * * @return The deserialized message as an object (null if the message cannot be deserialized). */ - T deserialize(byte[] message) throws IOException; + default T deserialize(ConsumerRecordMetaInfo consumerRecordMetaInfossage) throws IOException { --- End diff -- I would also vote for deprecating those classes and creating a specific version `KafkaDeserializationSchema`/`KafkaSerializationSchema`. I would also like to add a corresponding option to `SerializationSchema` to pass the targetTopic down, e.g. to be able to lookup appropriate schema in SchemaRegistry. I think changes like those does not fit well into a common space. > Get the timestamp of the Kafka message from kafka consumer(Kafka010Fetcher) > --------------------------------------------------------------------------- > > Key: FLINK-8500 > URL: https://issues.apache.org/jira/browse/FLINK-8500 > Project: Flink > Issue Type: Improvement > Components: Kafka Connector > Affects Versions: 1.4.0 > Reporter: yanxiaobin > Priority: Major > Fix For: 1.6.0 > > Attachments: image-2018-01-30-14-58-58-167.png, > image-2018-01-31-10-48-59-633.png > > > The method deserialize of KeyedDeserializationSchema needs a parameter > 'kafka message timestamp' (from ConsumerRecord) .In some business scenarios, > this is useful! > -- This message was sent by Atlassian JIRA (v7.6.3#76005)