Skip to content

Commit 68ea018

Browse files
committed
[FLINK-37231] Add doc for Source metrics.
1 parent 36da15a commit 68ea018

File tree

16 files changed

+305
-0
lines changed

16 files changed

+305
-0
lines changed

docs/content.zh/docs/connectors/flink-sources/db2-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,25 @@ public class Db2SourceExample {
354354
}
355355
```
356356

357+
### 可用的指标
358+
359+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
360+
361+
| Group | Name | Type | Description |
362+
|------------------------|----------------------------|-------|----------------|
363+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
364+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
365+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
366+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
367+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
368+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
369+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
370+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
371+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
372+
373+
注意:
374+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
375+
357376
The DB2 CDC incremental connector (since 3.1.0) can be used as the following shows:
358377
```java
359378
import org.apache.flink.api.common.eventtime.WatermarkStrategy;

docs/content.zh/docs/connectors/flink-sources/mongodb-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,25 @@ public class MongoDBIncrementalSourceExample {
488488
- 如果使用数据库正则表达式,则需要 `readAnyDatabase` 角色。
489489
- 增量快照功能仅支持 MongoDB 4.0 之后的版本。
490490
491+
### 可用的指标
492+
493+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
494+
495+
| Group | Name | Type | Description |
496+
|------------------------|----------------------------|-------|----------------|
497+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
498+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
499+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
500+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
501+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
502+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
503+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
504+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
505+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
506+
507+
注意:
508+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
509+
491510
数据类型映射
492511
----------------
493512
[BSON](https://docs.mongodb.com/manual/reference/bson-types/) **二进制 JSON**的缩写是一种类似 JSON 格式的二进制编码序列,用于在 MongoDB 中存储文档和进行远程过程调用。

docs/content.zh/docs/connectors/flink-sources/mysql-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,25 @@ $ ./bin/flink run \
776776
* 如果指定的列不存在更新操作,此时可以保证 Exactly once 语义。
777777
* 如果指定的列存在更新操作,此时只能保证 At least once 语义。但可以结合下游,通过指定下游主键,结合幂等性操作来保证数据的正确性。
778778

779+
### 可用的指标
780+
781+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
782+
783+
| Group | Name | Type | Description |
784+
|------------------------|----------------------------|-------|----------------|
785+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
786+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
787+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
788+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
789+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
790+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
791+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
792+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
793+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
794+
795+
注意:
796+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
797+
779798
数据类型映射
780799
----------------
781800

docs/content.zh/docs/connectors/flink-sources/oceanbase-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,25 @@ public class OceanBaseSourceExample {
569569
}
570570
```
571571
572+
### 可用的指标
573+
574+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
575+
576+
| Group | Name | Type | Description |
577+
|------------------------|----------------------------|-------|----------------|
578+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
579+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
580+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
581+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
582+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
583+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
584+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
585+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
586+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
587+
588+
注意:
589+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
590+
572591
数据类型映射
573592
----------------
574593

docs/content.zh/docs/connectors/flink-sources/oracle-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,25 @@ public class OracleSourceExample {
614614
}
615615
```
616616
617+
### 可用的指标
618+
619+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
620+
621+
| Group | Name | Type | Description |
622+
|------------------------|----------------------------|-------|----------------|
623+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
624+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
625+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
626+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
627+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
628+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
629+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
630+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
631+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
632+
633+
注意:
634+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
635+
617636
Data Type Mapping
618637
----------------
619638
<div class="wy-table-responsive">

docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,25 @@ public class PostgreSQLSourceExample {
521521
}
522522
```
523523

524+
### 可用的指标
525+
526+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
527+
528+
| Group | Name | Type | Description |
529+
|------------------------|----------------------------|-------|----------------|
530+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
531+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
532+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
533+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
534+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
535+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
536+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
537+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
538+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
539+
540+
注意:
541+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
542+
524543
Data Type Mapping
525544
----------------
526545

docs/content.zh/docs/connectors/flink-sources/sqlserver-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,25 @@ public class SqlServerIncrementalSourceExample {
409409
}
410410
```
411411

412+
### 可用的指标
413+
414+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
415+
416+
| Group | Name | Type | Description |
417+
|------------------------|----------------------------|-------|----------------|
418+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
419+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
420+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
421+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
422+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
423+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
424+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
425+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
426+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
427+
428+
注意:
429+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
430+
412431
Data Type Mapping
413432
----------------
414433

docs/content.zh/docs/connectors/pipeline-connectors/mysql.md

+19
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,25 @@ source:
343343
# ...
344344
```
345345

346+
### 可用的指标
347+
348+
指标系统能够帮助了解分片分发的进展, 下面列举出了支持的 Flink 指标 [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
349+
350+
| Group | Name | Type | Description |
351+
|------------------------|----------------------------|-------|----------------|
352+
| namespace.schema.table | isSnapshotting | Gauge | 表是否在快照读取阶段 |
353+
| namespace.schema.table | isStreamReading | Gauge | 表是否在增量读取阶段 |
354+
| namespace.schema.table | numTablesSnapshotted | Gauge | 已经被快照读取完成的表的数量 |
355+
| namespace.schema.table | numTablesRemaining | Gauge | 还没有被快照读取的表的数据 |
356+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | 正在处理的分片的数量 |
357+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | 还没有被处理的分片的数量 |
358+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | 已经处理完成的分片的数据 |
359+
| namespace.schema.table | snapshotStartTime | Gauge | 快照读取阶段开始的时间 |
360+
| namespace.schema.table | snapshotEndTime | Gauge | 快照读取阶段结束的时间 |
361+
362+
注意:
363+
Group 名称是 `namespace.schema.table`,这里的 `namespace` 是实际的数据库名称, `schema` 是实际的 schema 名称, `table` 是实际的表名称。
364+
346365
## 数据类型映射
347366

348367
<div class="wy-table-responsive">

docs/content/docs/connectors/flink-sources/db2-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,25 @@ public class Db2ParallelSourceExample {
394394
}
395395
```
396396

397+
### Available Source metrics
398+
399+
Metrics can help understand the progress of assignments, and the following are the supported [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
400+
401+
| Group | Name | Type | Description |
402+
|------------------------|----------------------------|-------|-----------------------------------------------------|
403+
| namespace.schema.table | isSnapshotting | Gauge | Weather the table is snapshotting or not |
404+
| namespace.schema.table | isStreamReading | Gauge | Weather the table is stream reading or not |
405+
| namespace.schema.table | numTablesSnapshotted | Gauge | The number of tables that have been snapshotted |
406+
| namespace.schema.table | numTablesRemaining | Gauge | The number of tables that have not been snapshotted |
407+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | The number of splits that is being processed |
408+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | The number of splits that have not been processed |
409+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | The number of splits that have been processed |
410+
| namespace.schema.table | snapshotStartTime | Gauge | The time when the snapshot started |
411+
| namespace.schema.table | snapshotEndTime | Gauge | The time when the snapshot ended |
412+
413+
Notice:
414+
The group name is `namespace.schema.table`, where `namespace` is the actual database name, `schema` is the actual schema name, and `table` is the actual table name.
415+
397416
Data Type Mapping
398417
----------------
399418

docs/content/docs/connectors/flink-sources/mongodb-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,25 @@ CREATE TABLE mongodb_source (...) WITH (
563563
)
564564
```
565565

566+
### Available Source metrics
567+
568+
Metrics can help understand the progress of assignments, and the following are the supported [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
569+
570+
| Group | Name | Type | Description |
571+
|------------------------|----------------------------|-------|-----------------------------------------------------|
572+
| namespace.schema.table | isSnapshotting | Gauge | Weather the table is snapshotting or not |
573+
| namespace.schema.table | isStreamReading | Gauge | Weather the table is stream reading or not |
574+
| namespace.schema.table | numTablesSnapshotted | Gauge | The number of tables that have been snapshotted |
575+
| namespace.schema.table | numTablesRemaining | Gauge | The number of tables that have not been snapshotted |
576+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | The number of splits that is being processed |
577+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | The number of splits that have not been processed |
578+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | The number of splits that have been processed |
579+
| namespace.schema.table | snapshotStartTime | Gauge | The time when the snapshot started |
580+
| namespace.schema.table | snapshotEndTime | Gauge | The time when the snapshot ended |
581+
582+
Notice:
583+
The group name is `namespace.schema.table`, where `namespace` is the actual database name, `schema` is the actual schema name, and `table` is the actual table name.
584+
566585
Data Type Mapping
567586
----------------
568587
[BSON](https://docs.mongodb.com/manual/reference/bson-types/) short for **Binary JSON** is a binary-encoded serialization of JSON-like format used to store documents and make remote procedure calls in MongoDB.

docs/content/docs/connectors/flink-sources/mysql-cdc.md

+19
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,25 @@ CREATE TABLE products (
852852
`binary_data` field in the database is of type VARBINARY(N). In some scenarios, we need to convert binary data to base64 encoded string data. This feature can be enabled by adding the parameter 'debezium.binary.handling.mode'='base64',
853853
By adding this parameter, we can map the binary field type to 'STRING' in Flink SQL, thereby obtaining base64 encoded string data.
854854

855+
### Available Source metrics
856+
857+
Metrics can help understand the progress of assignments, and the following are the supported [Flink metrics](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/metrics/):
858+
859+
| Group | Name | Type | Description |
860+
|------------------------|----------------------------|-------|-----------------------------------------------------|
861+
| namespace.schema.table | isSnapshotting | Gauge | Weather the table is snapshotting or not |
862+
| namespace.schema.table | isStreamReading | Gauge | Weather the table is stream reading or not |
863+
| namespace.schema.table | numTablesSnapshotted | Gauge | The number of tables that have been snapshotted |
864+
| namespace.schema.table | numTablesRemaining | Gauge | The number of tables that have not been snapshotted |
865+
| namespace.schema.table | numSnapshotSplitsProcessed | Gauge | The number of splits that is being processed |
866+
| namespace.schema.table | numSnapshotSplitsRemaining | Gauge | The number of splits that have not been processed |
867+
| namespace.schema.table | numSnapshotSplitsFinished | Gauge | The number of splits that have been processed |
868+
| namespace.schema.table | snapshotStartTime | Gauge | The time when the snapshot started |
869+
| namespace.schema.table | snapshotEndTime | Gauge | The time when the snapshot ended |
870+
871+
Notice:
872+
The group name is `namespace.schema.table`, where `namespace` is the actual database name, `schema` is the actual schema name, and `table` is the actual table name.
873+
855874
Data Type Mapping
856875
----------------
857876

0 commit comments

Comments
 (0)