tisonkun commented on code in PR #13:
URL:
https://github.com/apache/flink-connector-pulsar/pull/13#discussion_r1065269809
##########
docs/content.zh/docs/connectors/datastream/pulsar.md:
##########
@@ -804,113 +798,25 @@ Pulsar Sink 使用生产者 API 来发送消息。Pulsar 的 `ProducerConfigurat
{{< generated/pulsar_sink_configuration >}}
-### Sink 监控指标
+### 设计思想简述
-下列表格列出了当前 Sink 支持的监控指标,前 6 个指标是 [FLIP-33: Standardize Connector
Metrics]([https://cwiki.apache.org/confluence/display/FLINK/FLIP-33%3A+Standardize+Connector+Metrics](https://cwiki.apache.org/confluence/display/FLINK/FLIP-33%3A+Standardize+Connector+Metrics))
中规定的 Sink 连接器应当支持的标准指标。
-
-<table class="table table-bordered">
- <thead>
- <tr>
- <th class="text-left" style="width: 15%">Scope</th>
- <th class="text-left" style="width: 18%">Metrics</th>
- <th class="text-left" style="width: 18%">User Variables</th>
- <th class="text-left" style="width: 39%">Description</th>
- <th class="text-left" style="width: 10%">Type</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th rowspan="13">Operator</th>
- <td>numBytesOut</td>
- <td>n/a</td>
- <td>Pulsar Sink 启动后总共发出的字节数</td>
- <td>Counter</td>
- </tr>
- <tr>
- <td>numBytesOutPerSecond</td>
- <td>n/a</td>
- <td>每秒发送的字节数</td>
- <td>Meter</td>
- </tr>
- <tr>
- <td>numRecordsOut</td>
- <td>n/a</td>
- <td>Pulsar Sink 启动后总共发出的消息数</td>
- <td>Counter</td>
- </tr>
- <tr>
- <td>numRecordsOutPerSecond</td>
- <td>n/a</td>
- <td>每秒发送的消息数</td>
- <td>Meter</td>
- </tr>
- <tr>
- <td>numRecordsOutErrors</td>
- <td>n/a</td>
- <td>总共发送消息失败的次数</td>
- <td>Counter</td>
- </tr>
- <tr>
- <td>currentSendTime</td>
- <td>n/a</td>
- <td>最近一条消息从被放入客户端缓冲队列到收到消息确认的时间</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.numAcksReceived</td>
- <td>n/a</td>
- <td>总共收到的确认数</td>
- <td>Counter</td>
- </tr>
- <tr>
- <td>PulsarSink.sendLatencyMax</td>
- <td>n/a</td>
- <td>所有生产者的最大发送延迟</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.producer."ProducerName".sendLatency50Pct</td>
- <td>ProducerName</td>
- <td>某个生产者在过去的一个窗口内的发送延迟的中位数</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.producer."ProducerName".sendLatency75Pct</td>
- <td>ProducerName</td>
- <td>某个生产者在过去的一个窗口内的发送延迟的 75 百分位数</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.producer."ProducerName".sendLatency95Pct</td>
- <td>ProducerName</td>
- <td>某个生产者在过去的一个窗口内的发送延迟的 95 百分位数</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.producer."ProducerName".sendLatency99Pct</td>
- <td>ProducerName</td>
- <td>某个生产者在过去的一个窗口内的发送延迟的 99 百分位数</td>
- <td>Gauge</td>
- </tr>
- <tr>
- <td>PulsarSink.producer."ProducerName".sendLatency999Pct</td>
- <td>ProducerName</td>
- <td>某个生产者在过去的一个窗口内的发送延迟的 99.9 百分位数</td>
- <td>Gauge</td>
- </tr>
- </tbody>
-</table>
+Pulsar Sink 遵循
[FLIP-191](https://cwiki.apache.org/confluence/display/FLINK/FLIP-191%3A+Extend+unified+Sink+interface+to+support+small+file+compaction)
中定义的 Sink API 设计。
-{{< hint info >}}
-指标 `numBytesOut`、`numRecordsOut` 和 `numRecordsOutErrors` 从 Pulsar Producer
实例的监控指标中获得。
+#### 无状态的 SinkWriter
-`currentSendTime` 记录了最近一条消息从放入生产者的缓冲队列到消息被消费确认所耗费的时间。这项指标在 `NONE` 发送一致性下不可用。
-{{< /hint >}}
+在 `EXACTLY_ONCE` 一致性下,Pulsar Sink 不会将事务相关的信息存放于检查点快照中。这意味着当 Flink 应用重启时,Pulsar
Sink 会创建新的事务实例。上一次运行过程中任何未提交事务中的消息会因为超时中止而无法被下游的消费者所消费。这样的设计保证了 SinkWriter
是无状态的。
+
+#### Pulsar Schema Evolution
+
+[Pulsar Schema Evolution][schema-evolution] 允许用户在一个 Flink
应用程序中使用的数据模型发生特定改变后(比如向基于 ARVO 的 POJO 类中增加或删除一个字段),仍能使用同一个 Flink 应用程序的代码。
-默认情况下,Pulsar 生产者每隔 60 秒才会刷新一次监控数据,然而 Pulsar Sink 每 500 毫秒就会从 Pulsar
生产者中获得最新的监控数据。因此 `numRecordsOut`、`numBytesOut`、`numAcksReceived` 以及
`numRecordsOutErrors` 4 个指标实际上每 60 秒才会刷新一次。
+可以在 Pulsar 集群内指定哪些类型的数据模型的改变是被允许的,详情请参阅 [Pulsar Schema
Evolution][schema-evolution]。
-如果想要更高地刷新评率,可以通过如下方式来将 Pulsar 生产者的监控数据刷新频率调整至相应值(最低为1s):
-{{< tabs "b65b9978-b1d6-4b0d-ade8-78098e0f23d1" >}}
+## 监控指标
+
+默认情况下,Pulsar client 每隔 60 秒才会刷新一次监控数据。如果想要更高地刷新评率,可以通过如下方式来将 Pulsar client
的监控数据刷新频率调整至相应值(最低为1s):
Review Comment:
```suggestion
默认情况下,Pulsar client 每隔 60 秒才会刷新一次监控数据。如果想要更高地刷新频率,可以通过如下方式来将 Pulsar client
的监控数据刷新频率调整至相应值(最低为1s):
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]