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_r340045042
##########
File path: docs/dev/connectors/kafka.zh.md
##########
@@ -759,85 +586,50 @@ config.setWriteTimestampToKafka(true);
-## Kafka Connector metrics
-
-Flink's Kafka connectors provide some metrics through Flink's [metrics
system]({{ site.baseurl }}/monitoring/metrics.html) to analyze
-the behavior of the connector.
-The producers export Kafka's internal metrics through Flink's metric system
for all supported versions. The consumers export
-all metrics starting from Kafka version 0.9. The Kafka documentation lists all
exported metrics
-in its
[documentation](http://kafka.apache.org/documentation/#selector_monitoring).
+## Kafka Connector 指标
-In addition to these metrics, all consumers expose the `current-offsets` and
`committed-offsets` for each topic partition.
-The `current-offsets` refers to the current offset in the partition. This
refers to the offset of the last element that
-we retrieved and emitted successfully. The `committed-offsets` is the last
committed offset.
+Flink 的 Kafka 连接器通过 Flink 的 [metric 系统]({{ site.baseurl
}}/monitoring/metrics.html) 提供一些指标来分析 Kafka Connector 的状况。producer 通过 Flink 的
metrics 系统为所有支持的版本导出 Kafka 的内部指标。consumer 从 Kafka 0.9 版本开始导出所有指标。Kafka
文档在其[文档](http://kafka.apache.org/documentation/#selector_monitoring)中列出了所有导出的指标。
-The Kafka Consumers in Flink commit the offsets back to Zookeeper (Kafka 0.8)
or the Kafka brokers (Kafka 0.9+). If checkpointing
-is disabled, offsets are committed periodically.
-With checkpointing, the commit happens once all operators in the streaming
topology have confirmed that they've created a checkpoint of their state.
-This provides users with at-least-once semantics for the offsets committed to
Zookeeper or the broker. For offsets checkpointed to Flink, the system
-provides exactly once guarantees.
+除了这些指标之外,所有 consumer 都会公开每个主题分区的 `current-offsets` 和
`committed-offsets`。`current-offsets`
是指分区中的当前偏移量。指的是我们成功检索和发出的最后一个元素的偏移量。`committed-offsets` 是最后提交的偏移量。这为用户提供了
at-least-once 语义,用于提交给 Zookeeper 或 broker 的偏移量。对于 Flink 的偏移检查点,系统提供精准一次语义。
Review comment:
```suggestion
除了这些指标之外,所有 consumer 都暴露了每个主题分区的 `current-offsets` 和
`committed-offsets`。`current-offsets`
是指分区中的当前偏移量。指的是我们成功检索和发出的最后一个元素的偏移量。`committed-offsets` 是最后提交的偏移量。这为用户提供了
at-least-once 语义,用于提交给 Zookeeper 或 broker 的偏移量。对于 Flink 的偏移检查点,系统提供精准一次语义。
```
----------------------------------------------------------------
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