wuchong commented on a change in pull request #9764: [FLINK-12939][docs-zh] Translate "Apache Kafka Connector" page into Chinese URL: https://github.com/apache/flink/pull/9764#discussion_r340029195
########## File path: docs/dev/connectors/kafka.zh.md ########## @@ -197,41 +182,31 @@ stream = env </div> </div> -### The `DeserializationSchema` +### `DeserializationSchema` -The Flink Kafka Consumer needs to know how to turn the binary data in Kafka into Java/Scala objects. The -`DeserializationSchema` allows users to specify such a schema. The `T deserialize(byte[] message)` -method gets called for each Kafka message, passing the value from Kafka. +Flink Kafka Consumer 需要知道如何将 Kafka 中的二进制数据转换为 Java 或者 Scala 对象。`DeserializationSchema` 允许用户指定这样的 schema,为每条 Kafka 消息调用 `T deserialize(byte[] message)` 方法,从 Kafka 中传递值。 -It is usually helpful to start from the `AbstractDeserializationSchema`, which takes care of describing the -produced Java/Scala type to Flink's type system. Users that implement a vanilla `DeserializationSchema` need -to implement the `getProducedType(...)` method themselves. +从 `AbstractDeserializationSchema` 开始通常很有帮助,它负责将生成的 Java 或 Scala 类型描述为 Flink 的类型系统。 +用户如果要自己去实现一个`DeserializationSchema`,需要自己去实现 `getProducedType(...)`方法。 -For accessing the key, value and metadata of the Kafka message, the `KafkaDeserializationSchema` has -the following deserialize method `T deserialize(ConsumerRecord<byte[], byte[]> record)`. +为了访问 Kafka 消息的 key 、 value 和元数据,`KafkaDeserializationSchema` 具有以下反序列化方法 `T deserialize(ConsumerRecord<byte[], byte[]> record)`。 Review comment: ```suggestion 为了访问 Kafka 消息的 key、value 和元数据,`KafkaDeserializationSchema` 具有以下反序列化方法 `T deserialize(ConsumerRecord<byte[], byte[]> record)`。 ``` ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
