From 9cb204b0395da11019b9d3e64b9ddefd63d7ffa9 Mon Sep 17 00:00:00 2001 From: Jast Date: Thu, 24 Sep 2026 00:29:46 +0800 Subject: [PATCH 1/5] [Docs] Fix documentation inaccuracies verified against source code Fix option tables, type mappings, defaults, CLI/REST examples, and navigation verified against the Java source on dev. English and Chinese docs are updated together. Details in the PR description. --- docs/en/connectors/sink/Databend.md | 2 +- docs/en/connectors/sink/Datahub.md | 11 +- docs/en/connectors/sink/DuckDB.md | 11 +- docs/en/connectors/sink/Hudi.md | 2 +- docs/en/connectors/sink/Jdbc.md | 4 +- docs/en/connectors/sink/Kafka.md | 2 +- docs/en/connectors/sink/Prometheus.md | 2 +- docs/en/connectors/sink/Sls.md | 1 + docs/en/connectors/sink/Snowflake.md | 8 +- docs/en/connectors/sink/SqlServer.md | 6 +- docs/en/connectors/source/DB2.md | 2 +- docs/en/connectors/source/DuckDB.md | 20 +- docs/en/connectors/source/HiveJdbc.md | 4 +- docs/en/connectors/source/Jdbc.md | 3 +- docs/en/connectors/source/Kafka.md | 2 +- docs/en/connectors/source/Mysql.md | 12 +- docs/en/connectors/source/OceanBase.md | 6 +- docs/en/connectors/source/Oracle.md | 8 +- docs/en/connectors/source/PostgreSQL-CDC.md | 2 +- docs/en/connectors/source/Pulsar.md | 2 +- docs/en/connectors/source/RocketMQ.md | 2 +- docs/en/connectors/source/Snowflake.md | 12 +- docs/en/connectors/source/SqlServer.md | 12 +- docs/en/connectors/source/Vertica.md | 6 +- docs/en/engines/zeta/checkpoint-storage.md | 4 +- .../engines/zeta/hybrid-cluster-deployment.md | 2 +- docs/en/engines/zeta/log-analysis-with-ai.md | 7 +- docs/en/engines/zeta/logging.md | 2 +- docs/en/engines/zeta/resource-isolation.md | 2 +- .../en/engines/zeta/rest-api-job-lifecycle.md | 33 +--- docs/en/engines/zeta/rest-api-v2.md | 4 +- docs/en/engines/zeta/security.md | 2 +- .../zeta/state-storage-and-recovery.md | 172 +++++++----------- docs/en/engines/zeta/tuning-guide.md | 12 +- .../submit-job-to-remote-zeta-cluster.md | 14 +- .../introduction/concepts/schema-feature.md | 4 +- docs/sidebars.js | 3 + docs/zh/connectors/sink/Aerospike.md | 41 +++++ docs/zh/connectors/sink/Databend.md | 2 +- docs/zh/connectors/sink/Datahub.md | 11 +- docs/zh/connectors/sink/DuckDB.md | 11 +- docs/zh/connectors/sink/Hudi.md | 2 +- docs/zh/connectors/sink/Jdbc.md | 4 +- docs/zh/connectors/sink/Kafka.md | 2 +- docs/zh/connectors/sink/Prometheus.md | 2 +- docs/zh/connectors/sink/Sls.md | 1 + docs/zh/connectors/sink/Snowflake.md | 8 +- docs/zh/connectors/sink/SqlServer.md | 6 +- docs/zh/connectors/source/DB2.md | 2 +- docs/zh/connectors/source/DuckDB.md | 20 +- docs/zh/connectors/source/HiveJdbc.md | 4 +- docs/zh/connectors/source/Jdbc.md | 3 +- docs/zh/connectors/source/Kafka.md | 2 +- docs/zh/connectors/source/Mysql.md | 12 +- docs/zh/connectors/source/OceanBase.md | 6 +- docs/zh/connectors/source/Oracle.md | 8 +- docs/zh/connectors/source/PostgreSQL-CDC.md | 2 +- docs/zh/connectors/source/Pulsar.md | 2 +- docs/zh/connectors/source/RocketMQ.md | 2 +- docs/zh/connectors/source/Snowflake.md | 10 +- docs/zh/connectors/source/SqlServer.md | 12 +- docs/zh/connectors/source/Vertica.md | 6 +- .../engines/zeta/hybrid-cluster-deployment.md | 2 +- docs/zh/engines/zeta/log-analysis-with-ai.md | 5 +- docs/zh/engines/zeta/logging.md | 2 +- docs/zh/engines/zeta/resource-isolation.md | 2 +- .../zh/engines/zeta/rest-api-job-lifecycle.md | 30 +-- docs/zh/engines/zeta/rest-api-v2.md | 4 +- docs/zh/engines/zeta/security.md | 2 +- .../zeta/state-storage-and-recovery.md | 155 ++++++---------- docs/zh/engines/zeta/tuning-guide.md | 10 +- .../submit-job-to-remote-zeta-cluster.md | 10 +- .../introduction/concepts/schema-feature.md | 4 +- 73 files changed, 389 insertions(+), 421 deletions(-) diff --git a/docs/en/connectors/sink/Databend.md b/docs/en/connectors/sink/Databend.md index 74dd6f91d544..234d15ed8b56 100644 --- a/docs/en/connectors/sink/Databend.md +++ b/docs/en/connectors/sink/Databend.md @@ -49,7 +49,7 @@ They can be downloaded via install-plugin.sh or from the Maven central repositor | url | String | Yes | - | Databend JDBC connection URL. It must start with `jdbc:databend://` | | username | String | Yes | - | Databend database username | | password | String | Yes | - | Databend database password | -| database | String | No | - | Databend database name used when `generate_sink_sql = true` (together with `table`) to generate the write SQL. No default is applied when unset | +| database | String | No | - | Databend database name. Used together with `table` to locate the target table. No default is applied when unset | | table | String | No | - | Databend table name | | batch_size | Integer | No | 1000 | Number of records for batch writing | | auto_commit | Boolean | No | true | Whether to auto-commit transactions | diff --git a/docs/en/connectors/sink/Datahub.md b/docs/en/connectors/sink/Datahub.md index e58bcca3da5d..46c84d16a990 100644 --- a/docs/en/connectors/sink/Datahub.md +++ b/docs/en/connectors/sink/Datahub.md @@ -15,7 +15,7 @@ import ChangeLog from '../changelog/connector-datahub.md'; The DataHub sink writes SeaTunnel rows to Alibaba Cloud DataHub. The connector supports single-table writes and multi-table writes. In multi-table -jobs, use placeholders such as `${table}` in `topic` to route records from +jobs, use placeholders such as `${table_name}` in `topic` to route records from different input tables to different DataHub topics. ## Key features @@ -63,8 +63,7 @@ The DataHub project name. ### topic [string] The DataHub topic name. For multi-table writes, this value can contain -placeholders such as `${table}`. `${table_name}` is only kept as a -deprecated compatibility alias; use `${table}` for new jobs. +placeholders such as `${table_name}`. The SeaTunnel field names must match the DataHub topic fields, because the sink writes fields by name according to the topic schema. @@ -124,7 +123,7 @@ sink { ### Write Multiple Input Tables to Matching Topics When the upstream source provides multiple tables, configure `topic` with the -`${table}` placeholder so each input table is routed to a topic with the same name. +`${table_name}` placeholder so each input table is routed to a topic with the same name. ```hocon env { @@ -167,7 +166,7 @@ sink { accessId = "your-access-id" accessKey = "your-access-key" project = "demo_project" - topic = "${table}" + topic = "${table_name}" timeout = 3000 retryTimes = 3 } @@ -182,7 +181,7 @@ No. The connector performs best-effort writes with bounded retries (`retryTimes` ### How does multi-table routing work? -When the upstream source emits more than one table, set `topic` to a value containing the `${table}` placeholder (for example `topic = "${table}"`). Each input table is then routed to a DataHub topic that shares its name. `${table_name}` is still recognized as a deprecated alias — prefer `${table}` in new jobs. The connector does not automatically create the target topic; create it in the DataHub project beforehand and ensure its schema field names match the upstream SeaTunnel schema. +When the upstream source emits more than one table, set `topic` to a value containing the `${table_name}` placeholder (for example `topic = "${table_name}"`). Each input table is then routed to a DataHub topic that shares its name. The connector does not automatically create the target topic; create it in the DataHub project beforehand and ensure its schema field names match the upstream SeaTunnel schema. ### Why is `topic` a required field even for single-table jobs? diff --git a/docs/en/connectors/sink/DuckDB.md b/docs/en/connectors/sink/DuckDB.md index d2f8ab1a5ab4..79cb2d5a79cd 100644 --- a/docs/en/connectors/sink/DuckDB.md +++ b/docs/en/connectors/sink/DuckDB.md @@ -51,17 +51,22 @@ works against a local database file path (`jdbc:duckdb:/path/to/database.db`) or | SeaTunnel Data Type | DuckDB Data Type | |---------------------------------------------------------------------|------------------| | BOOLEAN | BOOLEAN | -| TINYINT
SMALLINT
INT | INTEGER | +| TINYINT | TINYINT | +| SMALLINT | SMALLINT | +| INT | INTEGER | | BIGINT | BIGINT | | DECIMAL(x,y)(Get the designated column's specified column size.<38) | DECIMAL(x,y) | -| DECIMAL(x,y)(Get the designated column's specified column size.>38) | DECIMAL(38,18) | +| DECIMAL(x,y)(Get the designated column's specified column size.>38) | DECIMAL(38,y) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | | STRING | VARCHAR | | DATE | DATE | | TIME | TIME | | TIMESTAMP | TIMESTAMP | -| BYTES
ARRAY
ROW
MAP | BLOB | +| TIMESTAMP_TZ | TIMESTAMP WITH TIME ZONE | +| BYTES | BLOB | + +> Complex SeaTunnel types (`ARRAY`, `ROW`, `MAP`) are not supported for writing to DuckDB. ## Sink Options diff --git a/docs/en/connectors/sink/Hudi.md b/docs/en/connectors/sink/Hudi.md index 546793e498a0..d355f7ba958d 100644 --- a/docs/en/connectors/sink/Hudi.md +++ b/docs/en/connectors/sink/Hudi.md @@ -107,7 +107,7 @@ Note: When this configuration corresponds to a single table, you can flatten the ### op_type [enum] -`op_type` The operation type of hudi table. The value is `insert` or `upsert` or `bulk_insert`. +`op_type` The operation type of hudi table. The value is `INSERT`, `UPSERT`, or `BULK_INSERT`. ### batch_interval_ms [Int] diff --git a/docs/en/connectors/sink/Jdbc.md b/docs/en/connectors/sink/Jdbc.md index 4ede4637bf8b..3204193df6dd 100644 --- a/docs/en/connectors/sink/Jdbc.md +++ b/docs/en/connectors/sink/Jdbc.md @@ -257,8 +257,8 @@ If one dialect not supported by SeaTunnel, it will use the default dialect `Gene | SqlServer | Tablestore | Teradata | | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | -| DSQL | | | -| YashanDB | | | +| OpenGauss | Presto | Dsql | +| DuckDB | DSQL | YashanDB | ### database [string] The target database or catalog used in generated SQL mode. This option is required when `generate_sink_sql = true` and must not be combined with `query`. diff --git a/docs/en/connectors/sink/Kafka.md b/docs/en/connectors/sink/Kafka.md index 08604ce68a45..023e0619b5c6 100644 --- a/docs/en/connectors/sink/Kafka.md +++ b/docs/en/connectors/sink/Kafka.md @@ -507,7 +507,7 @@ sink { ### What message formats does Kafka Sink support? -Kafka Sink supports: `json`, `text`, `canal_json`, `debezium_json`, `ogg_json`, `avro`, `protobuf`, and `NATIVE`. Use `NATIVE` when the upstream data is already in Kafka-native format (with headers, key, and value as byte fields). +Kafka Sink supports: `json`, `text`, `canal_json`, `debezium_json`, `compatible_debezium_json`, `ogg_json`, `maxwell_json`, `avro`, `protobuf`, and `NATIVE`. Use `NATIVE` when the upstream data is already in Kafka-native format (with headers, key, and value as byte fields). ## Changelog diff --git a/docs/en/connectors/sink/Prometheus.md b/docs/en/connectors/sink/Prometheus.md index b0408fc741ec..911f9a5a69df 100644 --- a/docs/en/connectors/sink/Prometheus.md +++ b/docs/en/connectors/sink/Prometheus.md @@ -50,7 +50,7 @@ downloaded from Maven Central. | key_value | String | Yes | - | Name of the upstream field that contains the Prometheus sample value. A `double` field is recommended. | | key_timestamp | String | No | - | Name of the upstream field that contains the Prometheus sample timestamp. If omitted, the sink uses the current system time. | | headers | Map | No | - | HTTP request headers. | -| retry | Int | No | 3 | Maximum retry attempts for a failed remote-write request. Retries transport `IOException`s and retryable HTTP statuses (`5xx` and `429`); other `4xx` responses fail fast. Set to `0` to disable retries. | +| retry | Int | No | - | Maximum retry attempts for a failed remote-write request. Not set by default: the request is attempted once with no retries. Retries transport `IOException`s and retryable HTTP statuses (`5xx` and `429`); other `4xx` responses fail fast. Set to `0` to disable retries explicitly. | | retry_backoff_multiplier_ms | Int | No | 100 | Retry backoff multiplier in milliseconds. | | retry_backoff_max_ms | Int | No | 10000 | Maximum retry backoff in milliseconds. | | batch_size | Int | No | 1024 | Positive number of rows buffered before writing to Prometheus. | diff --git a/docs/en/connectors/sink/Sls.md b/docs/en/connectors/sink/Sls.md index 77bc18be18cf..0cc3b3178d19 100644 --- a/docs/en/connectors/sink/Sls.md +++ b/docs/en/connectors/sink/Sls.md @@ -41,6 +41,7 @@ Maven central repository. | access_key_secret | String | Yes | - | Alibaba Cloud AccessKey secret. Must not be empty or whitespace-only. | | source | String | No | `SeaTunnel-Source` | Source tag written to SLS log groups. | | topic | String | No | `SeaTunnel-Topic` | Topic tag written to SLS log groups. | +| log_group_size | Int | No | 100 | Size of the SLS log group used when batching logs for write. | ## Notes diff --git a/docs/en/connectors/sink/Snowflake.md b/docs/en/connectors/sink/Snowflake.md index fa736b8a7f82..3ab84d20fe98 100644 --- a/docs/en/connectors/sink/Snowflake.md +++ b/docs/en/connectors/sink/Snowflake.md @@ -43,14 +43,16 @@ Write data to Snowflake through JDBC. The sink supports batch and streaming jobs | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, 18) | +| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | | DATE | DATE | | TIME | TIME | -| DATETIME
TIMESTAMP
TIMESTAMP_LTZ
TIMESTAMP_NTZ
TIMESTAMP_TZ | TIMESTAMP | -| BINARY
VARBINARY
GEOGRAPHY
GEOMETRY | BYTES | +| DATETIME
TIMESTAMP
TIMESTAMP_NTZ | TIMESTAMP | +| TIMESTAMP_LTZ
TIMESTAMP_TZ | TIMESTAMP_TZ | +| BINARY
VARBINARY | BYTES | +| GEOGRAPHY
GEOMETRY | STRING | ## Sink Options diff --git a/docs/en/connectors/sink/SqlServer.md b/docs/en/connectors/sink/SqlServer.md index acc20231e4f5..18686b2bc8d5 100644 --- a/docs/en/connectors/sink/SqlServer.md +++ b/docs/en/connectors/sink/SqlServer.md @@ -64,8 +64,10 @@ semantics (using XA transaction guarantee). | CHAR
NCHAR
VARCHAR
NTEXT
NVARCHAR
TEXT | STRING | | DATE | LOCAL_DATE | | TIME | LOCAL_TIME | -| DATETIME
DATETIME2
SMALLDATETIME
DATETIMEOFFSET | LOCAL_DATE_TIME | -| TIMESTAMP
BINARY
VARBINARY
IMAGE
UNKNOWN | Not supported yet | +| DATETIME
DATETIME2
SMALLDATETIME | LOCAL_DATE_TIME | +| DATETIMEOFFSET | OFFSET_DATE_TIME | +| BINARY
VARBINARY
IMAGE
TIMESTAMP | BYTES | +| UNKNOWN | Not supported yet | ## Sink Options diff --git a/docs/en/connectors/source/DB2.md b/docs/en/connectors/source/DB2.md index 57576cd335e3..5c5ff3e4079d 100644 --- a/docs/en/connectors/source/DB2.md +++ b/docs/en/connectors/source/DB2.md @@ -72,7 +72,7 @@ Read data from DB2 through JDBC. DB2 requires the IBM `db2jcc` driver; SeaTunnel | driver | String | Yes | - | JDBC driver class name. Use `com.ibm.db2.jcc.DB2Driver` for DB2. | | username | String | No | - | Username for the DB2 instance. `user` is also accepted as a fallback key for `username`. | | password | String | No | - | Password for the DB2 instance. | -| query | String | Yes | - | SELECT statement used to read data. The column list of the SELECT defines the output schema; select only the columns you need. | +| query | String | No | - | SELECT statement used to read data. The column list of the SELECT defines the output schema; select only the columns you need. Required when neither `table_path` nor `table_list` is configured. | | connection_check_timeout_sec | Int | No | 30 | Seconds to wait for the connection check before failing. | | partition_column | String | No | - | Column used to split data for parallel reading. Supports numeric columns and string columns (with `split.string_split_mode`); only one column can be configured. | | partition_lower_bound | String | No | - | Lower bound of `partition_column` for range splitting. If not set, SeaTunnel queries the minimum value. | diff --git a/docs/en/connectors/source/DuckDB.md b/docs/en/connectors/source/DuckDB.md index 0d80cc2a8f2a..2e4cd5f30e82 100644 --- a/docs/en/connectors/source/DuckDB.md +++ b/docs/en/connectors/source/DuckDB.md @@ -54,20 +54,24 @@ and reading multiple tables in one job through `table_list`. |---------------------------------------------------------------------|---------------------| | BOOLEAN | BOOLEAN | | TINYINT | TINYINT | -| UTINYINT
SMALLINT | SMALLINT | -| USMALLINT
INTEGER | INT | -| UINTEGER
BIGINT | BIGINT | -| UBIGINT | DECIMAL(20,0) | +| UTINYINT | TINYINT | +| SMALLINT | SMALLINT | +| USMALLINT | SMALLINT | +| INTEGER | INT | +| UINTEGER | INT | +| BIGINT
UBIGINT | BIGINT | | HUGEINT | DECIMAL(38,0) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | | DECIMAL(x,y)(Get the designated column's specified column size.<38) | DECIMAL(x,y) | -| DECIMAL(x,y)(Get the designated column's specified column size.>38) | DECIMAL(38,18) | +| DECIMAL(x,y)(Get the designated column's specified column size.>38) | DECIMAL(38,y) | | VARCHAR
CHAR
TEXT
JSON
UUID
INTERVAL | STRING | | DATE | DATE | | TIME | TIME | -| TIMESTAMP
TIMESTAMP WITH TIME ZONE | TIMESTAMP | -| BLOB
ARRAY
STRUCT
MAP | BYTES | +| TIMESTAMP | TIMESTAMP | +| TIMESTAMP WITH TIME ZONE | TIMESTAMP_TZ | +| BLOB | BYTES | +| ARRAY
STRUCT
MAP | STRING | ## Source Options @@ -77,7 +81,7 @@ and reading multiple tables in one job through `table_list`. | driver | String | Yes | - | The jdbc class name used to connect to the remote data source,
if you use DuckDB the value is `org.duckdb.DuckDBDriver`. | | username | String | No | - | Connection instance user name | | password | String | No | - | Connection instance password | -| query | String | Yes | - | Query statement | +| query | String | No | - | Query statement. Required when neither `table_path` nor `table_list` is configured. | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type primary key, and only can config one column. | | partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | diff --git a/docs/en/connectors/source/HiveJdbc.md b/docs/en/connectors/source/HiveJdbc.md index 650747f889a8..c58bae28e618 100644 --- a/docs/en/connectors/source/HiveJdbc.md +++ b/docs/en/connectors/source/HiveJdbc.md @@ -79,8 +79,8 @@ authentication is supported. | socket_timeout_ms | Int | No | 86400000 | Socket timeout in milliseconds for reading data from the server. Set to `0` for no timeout. Tested with Hive 3.2.0+. For earlier versions, not yet verified. | | connect_timeout_ms | Int | No | 86400000 | Connection timeout in milliseconds for establishing a connection to the server. Set to `0` for no timeout. Tested with Hive 3.2.0+. For earlier versions, not yet verified. | | partition_column | String | No | - | The column name for parallelism partition. Only supports numeric primary key columns. | -| partition_lower_bound | BigDecimal | No | - | The `partition_column` minimum value for the scan. If not set, SeaTunnel queries the database for the minimum value. | -| partition_upper_bound | BigDecimal | No | - | The `partition_column` maximum value for the scan. If not set, SeaTunnel queries the database for the maximum value. | +| partition_lower_bound | String | No | - | The `partition_column` minimum value for the scan. If not set, SeaTunnel queries the database for the minimum value. | +| partition_upper_bound | String | No | - | The `partition_column` maximum value for the scan. If not set, SeaTunnel queries the database for the maximum value. | | partition_num | Int | No | 10 | Number of partitions. Only positive integers are supported. Default value is 10. | | fetch_size | Int | No | 0 | For queries that return a large number of rows, configure the row fetch size used in the query to improve performance by reducing the number of database hits required to satisfy the selection criteria. `0` means use the JDBC driver default. | | common-options | | No | - | Source plugin common parameters, please refer to [Source Common Options](../common-options/source-common-options.md) for details. | diff --git a/docs/en/connectors/source/Jdbc.md b/docs/en/connectors/source/Jdbc.md index 3a89100647f5..d751fbdbde49 100644 --- a/docs/en/connectors/source/Jdbc.md +++ b/docs/en/connectors/source/Jdbc.md @@ -288,7 +288,8 @@ If one dialect not supported by SeaTunnel, it will use the default dialect `Gene | SqlServer | Tablestore | Teradata | | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | -| YashanDB | | | +| OpenGauss | Presto | Dsql | +| DuckDB | YashanDB | | Dameng `NCHAR` source columns are mapped to SeaTunnel `STRING`. diff --git a/docs/en/connectors/source/Kafka.md b/docs/en/connectors/source/Kafka.md index 99ddb78fdd56..4424dc47ffee 100644 --- a/docs/en/connectors/source/Kafka.md +++ b/docs/en/connectors/source/Kafka.md @@ -67,7 +67,7 @@ They can be downloaded via install-plugin.sh or from the Maven central repositor | poll.timeout | Long | No | 10000 | The interval(millis) for poll messages. | | kafka.config | Map | No | - | In addition to the above necessary parameters that must be specified by the `Kafka consumer` client, users can also specify multiple `consumer` client non-mandatory parameters, covering [all consumer parameters specified in the official Kafka document](https://kafka.apache.org/documentation.html#consumerconfigs). | | schema | Config | No | - | The structure of the data, including field names and field types. For more details, please refer to [Schema Feature](../../introduction/concepts/schema-feature.md). | -| format | String | No | json | Data format. The default format is json. Optional text format, canal_json, debezium_json, maxwell_json, ogg_json, avro , protobuf and native. If you use json or text format. The default field separator is ", ". If you customize the delimiter, add the "field_delimiter" option.If you use canal format, please refer to [canal-json](../formats/canal-json.md) for details.If you use debezium format, please refer to [debezium-json](../formats/debezium-json.md) for details. Some format details please refer [formats](../formats) | +| format | String | No | json | Data format. The default format is json. Optional text format, canal_json, debezium_json, compatible_kafka_connect_json, maxwell_json, ogg_json, avro, protobuf and native. If you use json or text format. The default field separator is ", ". If you customize the delimiter, add the "field_delimiter" option.If you use canal format, please refer to [canal-json](../formats/canal-json.md) for details.If you use debezium format, please refer to [debezium-json](../formats/debezium-json.md) for details. Some format details please refer [formats](../formats) | | avro_schema | String | No | - | Effective when `format` is `avro`. Provides the writer Avro schema used to deserialize binary Avro messages whose record name, namespace, or union layout differs from the SeaTunnel schema. | | value_converter_schema_enabled | Boolean | No | true | Effective only when `format = compatible_kafka_connect_json`. Whether the Kafka Connect value converter carries its schema in the JSON payload. | | format_error_handle_way | String | No | fail | The processing method of data format error. The default value is fail, and the optional value is (fail, skip). When fail is selected, data format error will block and an exception will be thrown. When skip is selected, data format error will skip this line data. | diff --git a/docs/en/connectors/source/Mysql.md b/docs/en/connectors/source/Mysql.md index 16c2e7b88f5a..cc0a04814e60 100644 --- a/docs/en/connectors/source/Mysql.md +++ b/docs/en/connectors/source/Mysql.md @@ -78,9 +78,9 @@ Read external data source data through JDBC. | query | String | No | - | Query statement. Required when neither `table_path` nor `table_list` is configured. | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type,Only support numeric type primary key, and only can config one column. | -| partition_lower_bound | BigDecimal | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | -| partition_upper_bound | BigDecimal | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | -| partition_num | Int | No | job parallelism | The number of partition count, only support positive integer. default value is job parallelism | +| partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | +| partition_upper_bound | String | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | +| partition_num | Int | No | 10 | The number of partition count, only support positive integer. default value is 10 | | fetch_size | Int | No | 0 | For queries that return a large number of objects,you can configure
the row fetch size used in the query toimprove performance by
reducing the number database hits required to satisfy the selection criteria.
Zero means use jdbc default value. | | properties | Map | No | - | Additional connection configuration parameters,when properties and URL have the same parameters, the priority is determined by the
specific implementation of the driver. For example, in MySQL, properties take precedence over the URL. | | use_regex | Boolean | No | false | Control regular expression matching for table_path. When set to `true`, the table_path will be treated as a regular expression pattern. When set to `false` or not specified, the table_path will be treated as an exact path (no regex matching). | @@ -160,11 +160,11 @@ The inverse of the sampling rate used in the sample sharding strategy. For examp The column name for split data. -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] The partition_column max value for scan, if not set SeaTunnel will query database get max value. -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] The partition_column min value for scan, if not set SeaTunnel will query database get min value. @@ -172,7 +172,7 @@ The partition_column min value for scan, if not set SeaTunnel will query databas > Not recommended for use, The correct approach is to control the number of split through `split.size` -How many splits do we need to split into, only support positive integer. default value is job parallelism. +How many splits do we need to split into, only support positive integer. default value is 10. ## tips diff --git a/docs/en/connectors/source/OceanBase.md b/docs/en/connectors/source/OceanBase.md index d1716a93a5a5..8bd4cb1a766b 100644 --- a/docs/en/connectors/source/OceanBase.md +++ b/docs/en/connectors/source/OceanBase.md @@ -91,9 +91,9 @@ Read OceanBase data through JDBC. OceanBase can run in MySQL-compatible mode or | where_condition | String | No | - | Common row filter for all tables or queries. It must start with `where`, for example `where id > 100`. | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type column and string type column. | -| partition_lower_bound | BigDecimal | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | -| partition_upper_bound | BigDecimal | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | -| partition_num | Int | No | job parallelism | The number of partition count, only support positive integer. When reading by `table_path`, prefer `split.size` to control split size. | +| partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | +| partition_upper_bound | String | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | +| partition_num | Int | No | 10 | The number of partition count, only support positive integer. When reading by `table_path`, prefer `split.size` to control split size. | | fetch_size | Int | No | 0 | For queries that return a large number of objects, you can configure
the row fetch size used in the query to improve performance by
reducing the number database hits required to satisfy the selection criteria.
Zero means use jdbc default value. | | split.size | Int | No | 8096 | Number of rows in one split when reading by `table_path`. | | split.even-distribution.factor.lower-bound | Double | No | 0.05 | Lower bound used to judge whether split-key values are evenly distributed. | diff --git a/docs/en/connectors/source/Oracle.md b/docs/en/connectors/source/Oracle.md index 2d92bd5dcc47..9d53c4734546 100644 --- a/docs/en/connectors/source/Oracle.md +++ b/docs/en/connectors/source/Oracle.md @@ -72,8 +72,8 @@ Read external data source data through JDBC. | query | String | No | - | Query statement. Required when neither `table_path` nor `table_list` is configured. | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type,Only support numeric type primary key, and only can config one column. | -| partition_lower_bound | BigDecimal | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | -| partition_upper_bound | BigDecimal | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | +| partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | +| partition_upper_bound | String | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | | partition_num | Int | No | 10 | The number of partition count, only support positive integer. default value is 10 | | fetch_size | Int | No | 0 | For queries that return a large number of objects,you can configure
the row fetch size used in the query toimprove performance by
reducing the number database hits required to satisfy the selection criteria.
Zero means use jdbc default value. | | properties | Map | No | - | Additional connection configuration parameters,when properties and URL have the same parameters, the priority is determined by the
specific implementation of the driver. For example, in Oracle, properties take precedence over the URL. | @@ -158,11 +158,11 @@ The inverse of the sampling rate used in the sample sharding strategy. For examp The column name for split data. -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] The partition_column max value for scan, if not set SeaTunnel will query database get max value. -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] The partition_column min value for scan, if not set SeaTunnel will query database get min value. diff --git a/docs/en/connectors/source/PostgreSQL-CDC.md b/docs/en/connectors/source/PostgreSQL-CDC.md index b5e7facc7766..2978f16764b6 100644 --- a/docs/en/connectors/source/PostgreSQL-CDC.md +++ b/docs/en/connectors/source/PostgreSQL-CDC.md @@ -103,7 +103,7 @@ ALTER TABLE your_table_name REPLICA IDENTITY FULL; | snapshot.fetch.size | Integer | No | 1024 | The maximum fetch size for per poll when read table snapshot. | | slot.name | String | No | seatunnel | The PostgreSQL logical decoding slot name. Use a different slot name for each CDC job that reads from the same PostgreSQL instance. | | decoding.plugin.name | String | No | pgoutput | The name of the Postgres logical decoding plug-in installed on the server,Supported values are decoderbufs, wal2json, wal2json_rds, wal2json_streaming,wal2json_rds_streaming and pgoutput. | -| server-time-zone | String | No | UTC | The session time zone in database server. If not set, then ZoneId.systemDefault() is used to determine the server time zone. | +| server-time-zone | String | No | - | The session time zone in database server. If not set, then ZoneId.systemDefault() is used to determine the server time zone. | | connect.timeout.ms | Duration | No | 30000 | The maximum time that the connector should wait after trying to connect to the database server before timing out. | | connect.max-retries | Integer | No | 3 | The max retry times that the connector should retry to build database server connection. | | connection.pool.size | Integer | No | 20 | The jdbc connection pool size. | diff --git a/docs/en/connectors/source/Pulsar.md b/docs/en/connectors/source/Pulsar.md index cbcc17af0a56..fcf6b15eae75 100644 --- a/docs/en/connectors/source/Pulsar.md +++ b/docs/en/connectors/source/Pulsar.md @@ -400,7 +400,7 @@ When subscribing to partitioned topics or topic patterns (`topic-pattern`), SeaT ### Which cursor reset strategies and subscription modes are supported? -The source supports `EARLIEST` and `LATEST` startup modes through `cursor.startup.mode`. Consumers join the subscription with configurable subscription types (e.g. `Failover` or `Exclusive`), and SeaTunnel checkpoints message IDs to ensure reliable playback on failure. +The source supports `EARLIEST`, `LATEST`, `SUBSCRIPTION` and `TIMESTAMP` startup modes through `cursor.startup.mode`. Consumers join the subscription with configurable subscription types (e.g. `Failover` or `Exclusive`), and SeaTunnel checkpoints message IDs to ensure reliable playback on failure. ### How do I configure authentication for secure Pulsar clusters? diff --git a/docs/en/connectors/source/RocketMQ.md b/docs/en/connectors/source/RocketMQ.md index 2763a4624dae..055ca7a34c1b 100644 --- a/docs/en/connectors/source/RocketMQ.md +++ b/docs/en/connectors/source/RocketMQ.md @@ -291,7 +291,7 @@ Use the `tables_configs` configuration array. Each item defines its own `topics` ### Which starting offset modes are supported? -RocketMQ source supports starting from earliest offsets (`CONSUME_FROM_FIRST_OFFSET`), latest offsets (`CONSUME_FROM_LAST_OFFSET`), or timestamp-based offsets (`CONSUME_FROM_TIMESTAMP`) using the `start.mode` parameter. +RocketMQ source supports starting from the group offset (`CONSUME_FROM_GROUP_OFFSETS`, the default), earliest offsets (`CONSUME_FROM_FIRST_OFFSET`), latest offsets (`CONSUME_FROM_LAST_OFFSET`), timestamp-based offsets (`CONSUME_FROM_TIMESTAMP`, with `start.mode.timestamp`), or specific offsets (`CONSUME_FROM_SPECIFIC_OFFSETS`, with `start.mode.offsets`) using the `start.mode` parameter. ### How is fault tolerance achieved during job failover? diff --git a/docs/en/connectors/source/Snowflake.md b/docs/en/connectors/source/Snowflake.md index b9b12d2ba5b3..4bf8d646af07 100644 --- a/docs/en/connectors/source/Snowflake.md +++ b/docs/en/connectors/source/Snowflake.md @@ -45,16 +45,16 @@ Read data from Snowflake through JDBC. SeaTunnel uses the official Snowflake JDB | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, 18) | +| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | | DATE | DATE | | TIME | TIME | -| DATETIME
TIMESTAMP
TIMESTAMP_LTZ
TIMESTAMP_NTZ
TIMESTAMP_TZ | TIMESTAMP | +| DATETIME
TIMESTAMP
TIMESTAMP_NTZ | TIMESTAMP | +| TIMESTAMP_LTZ
TIMESTAMP_TZ | TIMESTAMP_TZ | | BINARY
VARBINARY | BYTES | -| GEOGRAPHY (WKB or EWKB)
GEOMETRY (WKB or EWKB) | BYTES | -| GEOGRAPHY (GeoJSON, WKT or EWKT)
GEOMETRY (GeoJSON, WKB or EWKB) | STRING | +| GEOGRAPHY
GEOMETRY | STRING | ## Source Options @@ -64,7 +64,7 @@ Read data from Snowflake through JDBC. SeaTunnel uses the official Snowflake JDB | driver | String | Yes | - | JDBC driver class name. Use `net.snowflake.client.jdbc.SnowflakeDriver` for Snowflake. | | username | String | No | - | Username for the Snowflake account. | | password | String | No | - | Password for the Snowflake account. | -| query | String | Yes | - | SELECT statement used to read data. The column list of the SELECT defines the output schema; select only the columns you need. | +| query | String | No | - | SELECT statement used to read data. Required when neither `table_path` nor `table_list` is configured. The column list of the SELECT defines the output schema; select only the columns you need. | | connection_check_timeout_sec | Int | No | 30 | Seconds to wait for the connection check before failing. | | partition_column | String | No | - | Column used to split data for parallel reading. Supports numeric columns and string columns (with `split.string_split_mode`); only one column can be configured. | | partition_lower_bound | String | No | - | Lower bound of `partition_column` for range splitting. If not set, SeaTunnel queries the minimum value. | @@ -151,7 +151,7 @@ source { - Use the `Jdbc` plugin name for Snowflake jobs and set `driver = "net.snowflake.client.jdbc.SnowflakeDriver"`. - Place the Snowflake JDBC driver jar in `$SEATUNNEL_HOME/plugins/jdbc/lib/` before running the job. - When reading in parallel, `partition_column`, `partition_lower_bound`, `partition_upper_bound`, and `partition_num` must describe the same numeric column range. -- Snowflake geospatial columns are returned as bytes or string depending on Snowflake JDBC URL parameters such as `GEOGRAPHY_OUTPUT_FORMAT`. +- Snowflake geospatial columns are mapped to the SeaTunnel `STRING` type. ## Changelog diff --git a/docs/en/connectors/source/SqlServer.md b/docs/en/connectors/source/SqlServer.md index 59257c6ab406..adcfbf9eb33e 100644 --- a/docs/en/connectors/source/SqlServer.md +++ b/docs/en/connectors/source/SqlServer.md @@ -82,9 +82,9 @@ parallel SeaTunnel split. | query | String | No | - | Query statement. Required when neither `table_path` nor `table_list` is configured. | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type. | -| partition_lower_bound | Long | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | -| partition_upper_bound | Long | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | -| partition_num | Int | No | job parallelism | The number of partition count, only support positive integer. default value is job parallelism | +| partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | +| partition_upper_bound | String | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | +| partition_num | Int | No | 10 | The number of partition count, only support positive integer. default value is 10 | | fetch_size | Int | No | 0 | For queries that return a large number of objects,you can configure
the row fetch size used in the query toimprove performance by
reducing the number database hits required to satisfy the selection criteria.
Zero means use jdbc default value. | | properties | Map | No | - | Additional connection configuration parameters,when properties and URL have the same parameters, the priority is determined by the
specific implementation of the driver. For example, in MySQL, properties take precedence over the URL. | | use_regex | Boolean| No | false | Control regular expression matching for table_path. When set to `true`, the table_path will be treated as a regular expression pattern. When set to `false` or not specified, the table_path will be treated as an exact path (no regex matching). | @@ -145,11 +145,11 @@ The inverse of the sampling rate used in the sample sharding strategy. For examp The column name for split data. -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] The partition_column max value for scan, if not set SeaTunnel will query database get max value. -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] The partition_column min value for scan, if not set SeaTunnel will query database get min value. @@ -157,7 +157,7 @@ The partition_column min value for scan, if not set SeaTunnel will query databas > Not recommended for use, The correct approach is to control the number of split through `split.size` -How many splits do we need to split into, only support positive integer. default value is job parallelism. +How many splits do we need to split into, only support positive integer. default value is 10. ## tips diff --git a/docs/en/connectors/source/Vertica.md b/docs/en/connectors/source/Vertica.md index 4f0ecd086201..9381c9333576 100644 --- a/docs/en/connectors/source/Vertica.md +++ b/docs/en/connectors/source/Vertica.md @@ -72,9 +72,9 @@ Read external data source data through JDBC. | query | String | Yes | - | Query statement | | connection_check_timeout_sec | Int | No | 30 | The time in seconds to wait for the database operation used to validate the connection to complete | | partition_column | String | No | - | The column name for parallelism's partition, only support numeric type,Only support numeric type primary key, and only can config one column. | -| partition_lower_bound | BigDecimal | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | -| partition_upper_bound | BigDecimal | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | -| partition_num | Int | No | job parallelism | The number of partition count, only support positive integer. default value is job parallelism | +| partition_lower_bound | String | No | - | The partition_column min value for scan, if not set SeaTunnel will query database get min value. | +| partition_upper_bound | String | No | - | The partition_column max value for scan, if not set SeaTunnel will query database get max value. | +| partition_num | Int | No | 10 | The number of partition count, only support positive integer. default value is 10 | | fetch_size | Int | No | 0 | For queries that return a large number of objects,you can configure
the row fetch size used in the query toimprove performance by
reducing the number database hits required to satisfy the selection criteria.
Zero means use jdbc default value. | | properties | Map | No | - | Additional connection configuration parameters,when properties and URL have the same parameters, the priority is determined by the
specific implementation of the driver. For example, in MySQL, properties take precedence over the URL. | | common-options | | No | - | Source plugin common parameters, please refer to [Source Common Options](../common-options/source-common-options.md) for details | diff --git a/docs/en/engines/zeta/checkpoint-storage.md b/docs/en/engines/zeta/checkpoint-storage.md index 9d47be3cecad..5e2740435e79 100644 --- a/docs/en/engines/zeta/checkpoint-storage.md +++ b/docs/en/engines/zeta/checkpoint-storage.md @@ -204,10 +204,10 @@ seatunnel: namespace: # checkpoint storage parent path, the default value is /seatunnel/checkpoint/ storage.type: hdfs fs.defaultFS: hdfs://localhost:9000 - // if you used kerberos, you can config like this: + # if you used kerberos, you can config like this: kerberosPrincipal: your-kerberos-principal kerberosKeytabFilePath: your-kerberos-keytab - // if you need hdfs-site config, you can config like this: + # if you need hdfs-site config, you can config like this: hdfs_site_path: /path/to/your/hdfs_site_path ``` diff --git a/docs/en/engines/zeta/hybrid-cluster-deployment.md b/docs/en/engines/zeta/hybrid-cluster-deployment.md index bf53fba99828..4f42637c7afa 100644 --- a/docs/en/engines/zeta/hybrid-cluster-deployment.md +++ b/docs/en/engines/zeta/hybrid-cluster-deployment.md @@ -441,7 +441,7 @@ mkdir -p $SEATUNNEL_HOME/logs ./bin/seatunnel-cluster.sh -d ``` -The logs will be written to `$SEATUNNEL_HOME/logs/seatunnel-engine-server.log` +The logs will be written to `$SEATUNNEL_HOME/logs/` (for example `seatunnel-engine-master.log` and `seatunnel-engine-worker.log`) ## 8. Submit And Manage Jobs diff --git a/docs/en/engines/zeta/log-analysis-with-ai.md b/docs/en/engines/zeta/log-analysis-with-ai.md index 236db16a22e6..2514d72e89b0 100644 --- a/docs/en/engines/zeta/log-analysis-with-ai.md +++ b/docs/en/engines/zeta/log-analysis-with-ai.md @@ -55,7 +55,8 @@ When logs are mixed, use the `ST-JID` value to select one job. For example: ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-server.log" > job.log +grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-master.log" \ + "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log ``` If per-job routing is enabled, inspect `job-.log`. In a multi-node Zeta cluster, collect @@ -65,12 +66,12 @@ REST endpoints: ```text GET http://:8080/logs/ GET http://:8080/logs?format=json -GET http://:5801/log +GET http://:8080/log ``` The first endpoint retrieves matching logs across Zeta nodes. The last endpoint reads logs from one node. A configured context path or dynamic HTTP port changes these URLs. See -[RESTful API V2](rest-api-v2.md#get-logs-from-all-nodes) for the complete behavior. +[RESTful API V2](rest-api-v2.md#get-log-content-from-a-single-node) for the complete behavior. For Kubernetes, preserve logs from all relevant master and worker pods. Start with the failure window and include previous container logs when a pod restarted: diff --git a/docs/en/engines/zeta/logging.md b/docs/en/engines/zeta/logging.md index 3abb488629b3..9410d6e09223 100644 --- a/docs/en/engines/zeta/logging.md +++ b/docs/en/engines/zeta/logging.md @@ -119,7 +119,7 @@ the [REST-API](rest-api-v2.md). ### Scheduled deletion of old logs -SeaTunnel supports scheduled deletion of old log files to prevent disk space exhaustion. You can add the following configuration in the `seatunnel.yml` file: +SeaTunnel supports scheduled deletion of old log files to prevent disk space exhaustion. You can add the following configuration in the `seatunnel.yaml` file: ```yaml seatunnel: diff --git a/docs/en/engines/zeta/resource-isolation.md b/docs/en/engines/zeta/resource-isolation.md index 27a85b52d77b..781c7d156cce 100644 --- a/docs/en/engines/zeta/resource-isolation.md +++ b/docs/en/engines/zeta/resource-isolation.md @@ -47,7 +47,7 @@ SeaTunnel can add `tag` to each worker node, when you submit job you can use `ta 2. add `tag_filter` to your job config -```hacon +```hocon env { parallelism = 1 job.mode = "BATCH" diff --git a/docs/en/engines/zeta/rest-api-job-lifecycle.md b/docs/en/engines/zeta/rest-api-job-lifecycle.md index 915b9764b6dc..42fd6dffc28c 100644 --- a/docs/en/engines/zeta/rest-api-job-lifecycle.md +++ b/docs/en/engines/zeta/rest-api-job-lifecycle.md @@ -149,7 +149,7 @@ Response fields: |---|---| | `jobId` | Unique job identifier | | `jobName` | Human-readable job name | -| `jobStatus` | `RUNNING`, `FINISHED`, `FAILED`, `CANCELLED` | +| `jobStatus` | `RUNNING`, `FINISHED`, `FAILED`, `CANCELED` | | `envOptions` | Env configuration applied | | `createTime` | Job creation timestamp | | `jobDag` | DAG structure | @@ -225,12 +225,9 @@ curl -X POST "http://:8080/stop-job" \ -d '{"jobId": "733584788375093248", "isStopWithSavePoint": true}' ``` -The savepoint path is printed in the job log and returned in the job final state: - -```bash -curl http://:8080/job-info/733584788375093248 | \ - python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('savepointPath', 'N/A'))" -``` +The savepoint data is written to the checkpoint storage under the directory of the given job +(`jobId`). The exact location depends on the configured `checkpoint.storage` namespace; the savepoint +trigger is also recorded in the engine server log. ### 5.3 Cancel (force) @@ -325,22 +322,12 @@ curl -X POST "http://:8080/submit-job?restoreMode=SAVEPOINT&restoreSourc }' ``` -### 6.3 Restart from a specific savepoint path -```bash -curl -X POST http://:8080/submit-job \ - -H "Content-Type: application/json" \ - -d '{ - "env": { - "job.name": "my-cdc-job-restored", - "job.mode": "STREAMING", - "checkpoint.interval": 30000, - "restore.mode": "savepoint", - "savepoint.path": "/seatunnel/checkpoint/savepoint/733584788375093248/1748595600000" - }, - "source": [ ... ], - "sink": [ ... ] - }' -``` +### 6.3 About choosing a specific savepoint + +Restoring from an arbitrary savepoint path is not supported. The engine always restores a job from +the latest savepoint (or latest completed checkpoint with `restoreMode=CHECKPOINT`) of the source +job selected via `restoreSourceJobId`, as shown in sections 6.1 and 6.2. Older state data of the +source job can be cleaned up manually from the checkpoint storage if no longer needed. --- diff --git a/docs/en/engines/zeta/rest-api-v2.md b/docs/en/engines/zeta/rest-api-v2.md index f49243e3252e..d99f21f5162d 100644 --- a/docs/en/engines/zeta/rest-api-v2.md +++ b/docs/en/engines/zeta/rest-api-v2.md @@ -1470,8 +1470,8 @@ Returns a list of logs from the requested node. #### Examples -To get a list of logs from the current node: `http://localhost:5801/log` -To get the content of a log file: `http://localhost:5801/log/job-898380162133917698.log` +To get a list of logs from the current node: `http://localhost:8080/log` +To get the content of a log file: `http://localhost:8080/log/job-898380162133917698.log` diff --git a/docs/en/engines/zeta/security.md b/docs/en/engines/zeta/security.md index b3c1b4257c49..c0cd45fb7a82 100644 --- a/docs/en/engines/zeta/security.md +++ b/docs/en/engines/zeta/security.md @@ -27,7 +27,7 @@ You can secure your REST-API-V2 service by enabling HTTPS. Both HTTP and HTTPS c | Parameter Name | Required | Description | |----------------|----------|-------------| -| `enable-http` | No | Whether to enable HTTP service, default is `true` | +| `enable-http` | No | Whether to enable HTTP service, default is `false` | | `port` | No | HTTP service port, default is `8080` | | `enable-https` | No | Whether to enable HTTPS service, default is `false` | | `https-port` | No | HTTPS service port, default is `8443` | diff --git a/docs/en/engines/zeta/state-storage-and-recovery.md b/docs/en/engines/zeta/state-storage-and-recovery.md index 526fd50b0b10..fc22a310ca9c 100644 --- a/docs/en/engines/zeta/state-storage-and-recovery.md +++ b/docs/en/engines/zeta/state-storage-and-recovery.md @@ -13,10 +13,8 @@ long-running streaming jobs. | Storage Category | Purpose | Default Location | |---|---|---| | Checkpoint | Fault-tolerant snapshots of pipeline operator state | `seatunnel.yaml` `checkpoint.storage` | -| Savepoint | User-triggered named checkpoint for planned stop/restart | Same path as checkpoint, different directory | -| IMap / MapStore | Distributed in-memory state (job metadata, running job data, metrics) | `hazelcast.yaml` MapStore base-dir | -| WAL (Write-Ahead Log) | Durability log for IMap persistence | Same MapStore base-dir | -| History Job Metadata | Completed/failed job records | MapStore base-dir | +| Savepoint | User-triggered named checkpoint for planned stop/restart | Same checkpoint storage, under the job's own directory | +| IMap / MapStore | Distributed in-memory state (job metadata, job state, history) | In memory; optionally persisted through the Hazelcast MapStore configured in `hazelcast.yaml` | --- @@ -48,12 +46,10 @@ For a CDC job this includes: seatunnel: engine: checkpoint: - interval: 10000 # milliseconds between checkpoints - timeout: 60000 # checkpoint completion timeout (ms) - max-concurrent: 1 # max concurrent in-flight checkpoints - tolerable-failure: 2 # allowed consecutive checkpoint failures + interval: 10000 # milliseconds between checkpoints + timeout: 60000 # checkpoint completion timeout (ms) storage: - type: hdfs # hdfs | localfile (deprecated) + type: hdfs # hdfs (also supports S3 / local file via the HDFS API) | localfile (deprecated) plugin-config: namespace: /seatunnel/checkpoint/ # must end with / # For S3: @@ -83,7 +79,7 @@ seatunnel: | Aspect | Checkpoint | Savepoint | |---|---|---| -| Trigger | Periodic / automatic | Manual (`seatunnel.sh -r --savepoint`) | +| Trigger | Periodic / automatic | Manual (`$SEATUNNEL_HOME/bin/seatunnel.sh --savepoint `) | | Purpose | Fault tolerance | Planned stop, upgrade, migration | | Lifecycle | Managed by engine | Managed by operator | | Retention | Auto-rotated | Kept until manually deleted | @@ -92,7 +88,7 @@ seatunnel: ```bash # Stop a running job and create a savepoint -$SEATUNNEL_HOME/bin/seatunnel.sh --stop-job --savepoint +$SEATUNNEL_HOME/bin/seatunnel.sh --savepoint # Or via REST API v2 curl -X POST http://:8080/stop-job \ @@ -121,14 +117,9 @@ $SEATUNNEL_HOME/bin/seatunnel.sh --config job.conf --restore-with-checkpoint / - savepoint/ - / - / - / - /state-data -``` +A savepoint is a checkpoint of savepoint type: it is written to the same checkpoint storage +configured above, under the directory of the job it belongs to (`//`). There is +no separate savepoint root directory. ### Safe cleanup @@ -141,45 +132,45 @@ Deleting an active savepoint mid-restore causes the job to fail with a "state no ### What IMap stores -SeaTunnel Engine uses Hazelcast IMap as its distributed in-memory key-value store. The following -logical maps are persisted: +SeaTunnel Engine uses Hazelcast IMap as its distributed in-memory key-value store. The main +logical maps used by the engine are: | IMap Name | Content | |---|---| -| `running-job-state` | Current state machine status of each running job | -| `running-job-metrics` | Real-time throughput, latency, and record count metrics | -| `running-pipeline-state` | Pipeline-level state for each logical pipeline | -| `finished-job-state` | Terminal state for completed, cancelled, or failed jobs | -| `finished-job-metrics` | Final metrics snapshot after job termination | +| `engine_runningJobInfo` | Submitted running job information (job id, job name, metrics snapshot) | +| `engine_runningJobState` | Current state machine status of running jobs and pipelines | +| `engine_stateTimestamps` | Timestamps of job/pipeline state transitions | +| `engine_finishedJobState` | Terminal state for completed, canceled, or failed jobs | +| `engine_finishedJobMetrics` | Final metrics snapshot after job termination | +| `engine_finishedJobVertexInfo` | Execution vertex information of finished jobs | ### MapStore (disk-backed persistence) -Hazelcast MapStore writes IMap entries to local disk so they survive process restarts. This is -**separate** from checkpoint storage. +By default IMap data is memory-only (replicated across nodes according to the backup count). If all +nodes stop, the data is lost unless the MapStore persistence is enabled. When enabled, the Hazelcast +MapStore writes IMap entries to an external file system (HDFS, S3, or local files through the HDFS +API) so they survive full cluster restarts. This is **separate** from checkpoint storage. -Default storage path: configured in `hazelcast.yaml`: +The persistence is configured in `hazelcast.yaml` (see +[Separated Zeta Cluster Deployment](separated-cluster-deployment.md) for details): ```yaml map: - seatunnel: + engine*: map-store: enabled: true - initial-load-mode: EAGER + initial-mode: EAGER + factory-class-name: org.apache.seatunnel.engine.server.persistence.FileMapStoreFactory properties: - hazelcast.fs.base-dir: /tmp/seatunnel/imap # absolute path - hazelcast.fs.write-behind-delay-seconds: 1 + type: hdfs + namespace: /tmp/seatunnel/imap # storage namespace (default /seatunnel-imap when unset) + clusterName: seatunnel-cluster + storage.type: hdfs + fs.defaultFS: hdfs://localhost:9000 ``` -MapStore directory layout: - -``` -/ - maps/ - running-job-state/ - running-job-metrics/ - finished-job-state/ - finished-job-metrics/ -``` +In separated cluster mode only the Master node stores IMap data, so this configuration takes effect +on the Master node. ### Relationship between IMap, MapStore, and Checkpoint @@ -189,38 +180,29 @@ IMap / MapStore <─────────────────── ``` They are **independent**. Deleting checkpoint storage does not affect IMap, and vice versa. -A job can be restarted from a checkpoint even if the IMap MapStore is wiped, **but the job ID -and pipeline mapping must be re-submitted** because running-job-state is lost. +A job can be restarted from a checkpoint even if the IMap MapStore data is wiped, **but the job ID +and pipeline mapping must be re-submitted** because the running job state is lost. --- -## 4. Write-Ahead Log (WAL) - -Hazelcast uses a write-ahead log for MapStore durability. WAL files accumulate under: - -``` -/ - wal/ - -.wal -``` - -### WAL growth in long-running CDC jobs - -Each CDC binlog event that updates `running-job-metrics` or `running-pipeline-state` generates a -WAL write. Over time (days or weeks) WAL files can grow into several GB if: +## 4. MapStore File Maintenance -- `write-behind-delay-seconds` is set very low (high flush frequency) -- The job processes millions of events per second +The IMap persistence writes each map as files under the configured `namespace`. In long-running +clusters these files keep growing while jobs keep running, because every state change of a running +job is written through the MapStore. **Mitigation:** -```yaml -hazelcast.fs.write-behind-delay-seconds: 5 # increase flush interval -hazelcast.fs.compaction-threshold: 1000 # trigger compaction after N entries +- Let finished jobs expire: `history-job-expire-minutes` removes finished-job records from the + IMaps, which stops them from being persisted again. +- Monitor the namespace directory on the master node: + +```bash +du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml ``` -WAL files for **finished jobs** can be safely compacted or removed after the corresponding IMap -entries have been flushed to MapStore files. Do not delete WAL files for running jobs. +Do not delete MapStore files of running jobs. Files of finished jobs whose records have already +expired from the IMaps can be removed while the cluster is stopped. --- @@ -236,15 +218,12 @@ seatunnel: | Action | Covered by expire? | |---|---| -| Remove from `finished-job-state` IMap | Yes | -| Remove from `finished-job-metrics` IMap | Yes | -| Delete MapStore persistence files for that job | Yes (after IMap eviction) | +| Remove records from the finished-job IMaps (`engine_finishedJobState`, `engine_finishedJobMetrics`) | Yes | | Delete checkpoint storage directories | **No** | -| Delete savepoint directories | **No** | -| Delete WAL files | **No** (only indirectly via compaction) | +| Delete savepoint data | **No** | -**Key takeaway**: `history-job-expire-minutes` only cleans up the job metadata stored in -`finished-job-state`. Checkpoint and savepoint directories on HDFS / S3 / local are **never** +**Key takeaway**: `history-job-expire-minutes` only cleans up the job metadata stored in the +finished-job IMaps. Checkpoint and savepoint directories on HDFS / S3 / local are **never** touched by this setting. You must manage them separately. --- @@ -271,26 +250,19 @@ Retain **at least 3 checkpoints** per job at all times. Allocate: storage_needed = checkpoint_size × 3 × safety_factor(1.5) ``` -### IMap / WAL sizing +### IMap storage sizing Each running CDC job stores approximately: -- 50–200 bytes per pipeline in `running-job-state` -- 1–2 KB per pipeline per metric flush in `running-job-metrics` - -For a cluster running 100 CDC jobs: - -``` -imap_memory ≈ 100 × 200B ≈ 20 KB (state) -imap_memory ≈ 100 × 1KB × flush_rate ≈ manageable -``` +- 50–200 bytes per pipeline of job state +- 1–2 KB per pipeline per metrics flush -WAL disk: plan 2–5 GB per node for a busy CDC cluster. Mount a dedicated disk partition and monitor -with: +For a cluster running 100 CDC jobs this is in the order of a few MB of IMap data. The MapStore +namespace disk usage grows with the state transition history; plan a few GB per long-running +cluster and monitor it with: ```bash -du -sh $SEATUNNEL_HOME/imap/wal/ -watch -n 60 'du -sh /tmp/seatunnel/imap/' +du -sh /tmp/seatunnel/imap/ # your configured MapStore namespace ``` --- @@ -328,32 +300,25 @@ state is rotated out. --- -### IMap / WAL directory growing +### MapStore namespace directory growing -**Symptom**: `/tmp/seatunnel/imap/` fills the disk on master/worker nodes. +**Symptom**: The configured MapStore `namespace` directory fills the disk on the master node. **Diagnosis**: ```bash -du -sh /tmp/seatunnel/imap/wal/ -du -sh /tmp/seatunnel/imap/maps/ +du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml ``` **Root cause candidates**: -- `running-job-metrics` updates at every checkpoint for every running job -- `write-behind-delay-seconds` is too low (default 1 s) -- WAL compaction is not happening frequently enough +- Finished jobs are not expiring (`history-job-expire-minutes` is not set or too large) +- Too many running jobs continuously updating their state and metrics **Fix**: -```yaml -# hazelcast.yaml -hazelcast.fs.write-behind-delay-seconds: 10 -hazelcast.fs.compaction-threshold: 500 -``` - -After restarting the engine, old WAL files from finished jobs will be compacted during startup. +Enable/tune `history-job-expire-minutes` in `seatunnel.yaml`, and clean up files of expired jobs +while the cluster is stopped if needed. --- @@ -377,12 +342,11 @@ After restarting the engine, old WAL files from finished jobs will be compacted Before deleting any state directory: -- [ ] Confirm the job is in `FINISHED`, `CANCELLED`, or `FAILED` terminal state +- [ ] Confirm the job is in `FINISHED`, `CANCELED`, or `FAILED` terminal state - [ ] Confirm you will not restore from checkpoint or savepoint - [ ] Confirm the job ID is not referenced in any monitoring or alerting rule - [ ] For checkpoint storage: delete `//` recursively -- [ ] For savepoint: delete `/savepoint//` recursively -- [ ] For MapStore/WAL: restart the engine after manual deletion to trigger reload +- [ ] For MapStore data: stop the cluster before deleting files of expired jobs --- diff --git a/docs/en/engines/zeta/tuning-guide.md b/docs/en/engines/zeta/tuning-guide.md index fa07df70578a..bfc2601981fe 100644 --- a/docs/en/engines/zeta/tuning-guide.md +++ b/docs/en/engines/zeta/tuning-guide.md @@ -20,7 +20,7 @@ If the SeaTunnel Engine cluster responds slowly or hangs, it may be due to insuf ##### Troubleshooting Process 1. Check JVM heap memory usage in real time - Use the `jcmd` command to check JVM heap memory usage, where `` is the PID of the SeaTunnel Engine process. + Use the `jmap` command to check JVM heap memory usage, where `` is the PID of the SeaTunnel Engine process. ```bash jmap -heap ``` @@ -169,7 +169,7 @@ Use the following decision tree to narrow down the root cause of slow operations ```bash # Check the slow operation log frequency and timing -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-server.log | tail -50 +grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -50 ``` Correlate the timestamps with: @@ -190,7 +190,7 @@ free -h **REST submission latency:** - Symptom: Slow operations appear when jobs are submitted via REST API, and the submitting client experiences long response times. -- Check: `grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-server.log` — look for elapsed time. +- Check: `grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log` — look for elapsed time. - Common cause: Master node is overloaded with concurrent submissions, or the job configuration is very large (many connectors/transforms). - Mitigation: Rate-limit concurrent submissions, increase master node resources, or use `hazelcast.operation.generic.thread.count` tuning. @@ -208,7 +208,7 @@ free -h **Checkpoint storage latency:** - Symptom: Slow operations align with checkpoint intervals, and checkpoint duration exceeds the configured timeout. -- Check: Enable DEBUG logging for `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator`, then `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-server.log | grep -oP 'cost: \d+ms'` to see checkpoint durations. +- Check: Enable DEBUG logging for `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator`, then `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | grep -oP 'cost: \d+ms'` to see checkpoint durations. - If using S3: Run `aws s3api head-object --bucket --key ` to measure latency, or check CloudWatch S3 metrics (`FirstByteLatency`, `TotalRequestLatency`). - Common cause: High network latency to S3/HDFS, small files causing many round trips, or S3 throttling. - Mitigation: See [Section 6](#6-s3-checkpointstate-storage-latency). @@ -307,7 +307,7 @@ SeaTunnel outputs health monitor logs periodically (every 60 seconds by default) ```bash # Extract slow operation warnings with their durations -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-server.log | tail -20 +grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -20 ``` #### 4.3 Node Resource Metrics @@ -373,7 +373,7 @@ curl -w "DNS: %{time_namelookup}s, Connect: %{time_connect}s, TTFB: %{time_start **Check checkpoint write performance:** ```bash # Monitor checkpoint duration from logs (requires DEBUG logging for CheckpointCoordinator) -grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-server.log | \ +grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | \ grep -oP 'cost: \d+ms' | sort -t: -k2 -nr | head -20 ``` diff --git a/docs/en/getting-started/submit-job-to-remote-zeta-cluster.md b/docs/en/getting-started/submit-job-to-remote-zeta-cluster.md index b31a763e638a..6804e53f5a92 100644 --- a/docs/en/getting-started/submit-job-to-remote-zeta-cluster.md +++ b/docs/en/getting-started/submit-job-to-remote-zeta-cluster.md @@ -24,18 +24,19 @@ port-forward` or direct NodePort/LoadBalancer access, and EKS/Helm deployments. ### 2.1 `--master` flag (Zeta) -All SeaTunnel Zeta client commands accept a `--master` argument that tells the client which cluster -to connect to: +All SeaTunnel Zeta client commands accept a `--master` (or `-m`) argument that tells the client +whether the job runs locally or on a cluster. It only accepts `local` or `cluster` — it does not +take a cluster address: ```bash bin/seatunnel.sh \ --config job.conf \ - --master seatunnel://192.168.1.100:5801 + -m cluster ``` -The default Zeta cluster-internal port is **5801**. This is *different* from the REST API port -(8080). The `--master` flag is used when running the job via the SeaTunnel client binary, which -communicates with the cluster over the Hazelcast member protocol. +The client picks up the target cluster from `config/hazelcast-client.yaml` (`cluster-name` and +`cluster-members`). The default Zeta cluster-internal port is **5801**. This is *different* from +the REST API port (8080). The client communicates with the cluster over the Hazelcast protocol. ### 2.2 Using the REST API (recommended for automation) @@ -341,7 +342,6 @@ helm upgrade seatunnel seatunnel/seatunnel \ |---|---|---|---| | **5801** | TCP | Hazelcast cluster | Member-to-member communication; do NOT expose publicly | | **8080** | TCP | REST API | Expose only via authenticated gateway in production | -| **8090** | TCP | Web UI | Optional; only needed for the dashboard | In Kubernetes, set up a `NetworkPolicy` to restrict port 5801 to the SeaTunnel namespace only: diff --git a/docs/en/introduction/concepts/schema-feature.md b/docs/en/introduction/concepts/schema-feature.md index c9651a4d9515..df6e064ae63c 100644 --- a/docs/en/introduction/concepts/schema-feature.md +++ b/docs/en/introduction/concepts/schema-feature.md @@ -167,7 +167,7 @@ When declaring complex types (such as **decimal**, **array**, **map**, and **row - When declaring a decimal type, precision and scale settings are required, and the type definition follows the format `decimal(precision, scale)`. It's essential to emphasize that the declaration of the decimal type must be enclosed in `"`; you cannot use the type name directly, as with basic types. For example, when declaring a decimal field with precision 10 and scale 2, you specify the field type as `"decimal(10,2)"`. - When declaring an array type, you need to specify the element type, and the type definition follows the format `array`, where `T` represents the element type. The element type includes `int`,`string`,`boolean`,`tinyint`,`smallint`,`bigint`,`float` and `double`. Similar to the decimal type declaration, it also be enclosed in `"`. For example, when declaring a field with an array of integers, you specify the field type as `"array"`. - When declaring a map type, you need to specify the key and value types. The map type definition follows the format `map`, where `K` represents the key type and `V` represents the value type. `K` can be any basic type and decimal type, and `V` can be any type supported by SeaTunnel. Similar to previous type declarations, the map type declaration must be enclosed in double quotes. For example, when declaring a field with map type, where the key type is string and the value type is integer, you can declare the field as `"map"`. -- When declaring a row type, you need to define a [HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) object to describe the fields and their types. The field types can be any type supported by SeaTunnel. For example, when declaring a row type containing an integer field `a` and a string field `b`, you can declare it as `{a = int, b = string}`. Enclosing the definition in `"` as a string is also acceptable, so `"{a = int, b = string}"` is equivalent to `{a = int, c = string}`. Since HOCON is compatible with JSON, `"{\"a\":\"int\", \"b\":\"string\"}"` is equivalent to `"{a = int, b = string}"`. +- When declaring a row type, you need to define a [HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) object to describe the fields and their types. The field types can be any type supported by SeaTunnel. For example, when declaring a row type containing an integer field `a` and a string field `b`, you can declare it as `{a = int, b = string}`. Enclosing the definition in `"` as a string is also acceptable, so `"{a = int, b = string}"` is equivalent to `{a = int, b = string}`. Since HOCON is compatible with JSON, `"{\"a\":\"int\", \"b\":\"string\"}"` is equivalent to `"{a = int, b = string}"`. Here is an example of complex type declarations: @@ -205,7 +205,7 @@ primaryKey { | Field | Required | Default Value | Description | |:--------|:---------|:--------------|-----------------------------------| | name | Yes | - | The name of the primaryKey | -| columns | Yes | - | The column list in the primaryKey | +| columnNames | Yes | - | The column list in the primaryKey | ### ConstraintKeys diff --git a/docs/sidebars.js b/docs/sidebars.js index 20b6f38a1afe..9ea668594938 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -172,6 +172,7 @@ const sidebars = { "getting-started/recipes/kafka-to-iceberg", "getting-started/recipes/postgresql-cdc-to-iceberg", "getting-started/recipes/http-to-jdbc", + "getting-started/recipes/jdbc-to-jdbc", "getting-started/recipes/file-to-starrocks", "getting-started/recipes/multi-table-cdc" ] @@ -282,6 +283,8 @@ const sidebars = { "engines/zeta/user-command", "engines/zeta/logging", "engines/zeta/log-analysis-with-ai", + "engines/zeta/stain-trace", + "engines/zeta/stain-trace-quickstart", "engines/zeta/telemetry", "engines/zeta/busyness-and-backpressure", "engines/zeta/live-metrics-chart", diff --git a/docs/zh/connectors/sink/Aerospike.md b/docs/zh/connectors/sink/Aerospike.md index 65c4ac23ce22..42c275c12350 100644 --- a/docs/zh/connectors/sink/Aerospike.md +++ b/docs/zh/connectors/sink/Aerospike.md @@ -154,6 +154,47 @@ sink { } ``` +### 通过 `kv` 格式将 CDC 记录写入 Aerospike + +对于流式作业(例如 MySQL CDC),可以使用 `data_format = "kv"` 将每个配置的字段作为独立的 +Aerospike bin 写入。这样每个字段单独存储,而不是打包进单个 JSON 或 map bin,下游查询成本更低。 + +```hocon +env { + parallelism = 2 + job.mode = "STREAMING" + checkpoint.interval = 10000 +} + +source { + Mysql-CDC { + url = "jdbc:mysql://127.0.0.1:3306/seatunnel" + username = "root" + password = "******" + table-names = ["seatunnel.user"] + } +} + +sink { + Aerospike { + host = "aerospike-host" + port = 3000 + namespace = "test" + set = "user" + key = "id" + data_format = "kv" + write_timeout = 500 + schema { + field { + id = "INTEGER" + name = "STRING" + email = "STRING" + } + } + } +} +``` + ## 更新日志 diff --git a/docs/zh/connectors/sink/Databend.md b/docs/zh/connectors/sink/Databend.md index e2d009b7b140..5943b57aca9c 100644 --- a/docs/zh/connectors/sink/Databend.md +++ b/docs/zh/connectors/sink/Databend.md @@ -48,7 +48,7 @@ Databend sink 内部通过 stage attachment 实现数据的批量导入。 | url | String | 是 | - | Databend JDBC 连接 URL,必须以 `jdbc:databend://` 开头 | | username | String | 是 | - | Databend 数据库用户名 | | password | String | 是 | - | Databend 数据库密码 | -| database | String | 否 | - | `generate_sink_sql = true` 时与 `table` 一起用于生成写入 SQL 的 Databend 数据库名称。未设置时不会自动回退 | +| database | String | 否 | - | Databend 数据库名称,与 `table` 一起用于定位目标表。未设置时不会自动回退 | | table | String | 否 | - | Databend 表名称 | | batch_size | Integer | 否 | 1000 | 批量写入的记录数 | | auto_commit | Boolean | 否 | true | 是否自动提交事务 | diff --git a/docs/zh/connectors/sink/Datahub.md b/docs/zh/connectors/sink/Datahub.md index 338ded00ae7a..f6b3b5c8145f 100644 --- a/docs/zh/connectors/sink/Datahub.md +++ b/docs/zh/connectors/sink/Datahub.md @@ -15,7 +15,7 @@ import ChangeLog from '../changelog/connector-datahub.md'; DataHub Sink 用于将 SeaTunnel 数据写入阿里云 DataHub。 该连接器支持单表写入和多表写入。多表写入时,可以在 `topic` 中使用 -`${table}` 这类占位符,将不同输入表的数据写入不同的 DataHub Topic。 +`${table_name}` 这类占位符,将不同输入表的数据写入不同的 DataHub Topic。 ## 关键特性 @@ -59,8 +59,7 @@ DataHub 项目名称。 ### topic [string] -DataHub Topic 名称。多表写入时可以使用占位符,例如 `${table}`。 -`${table_name}` 仅作为已废弃的兼容别名保留,新任务建议使用 `${table}`。 +DataHub Topic 名称。多表写入时可以使用占位符,例如 `${table_name}`。 SeaTunnel 字段名需要和 DataHub Topic 中的字段名一致,因为 sink 会按照 Topic 结构里的字段名写入数据。 @@ -116,7 +115,7 @@ sink { ### 多表写入匹配的 Topic -当上游 source 提供多个表时,可以使用 `${table}` 占位符配置 `topic`,让每个输入表路由到同名的 topic。 +当上游 source 提供多个表时,可以使用 `${table_name}` 占位符配置 `topic`,让每个输入表路由到同名的 topic。 ```hocon env { @@ -159,7 +158,7 @@ sink { accessId = "your-access-id" accessKey = "your-access-key" project = "demo_project" - topic = "${table}" + topic = "${table_name}" timeout = 3000 retryTimes = 3 } @@ -174,7 +173,7 @@ sink { ### 多表写入是如何路由的? -当上游 source 输出多张表时,把 `topic` 设置成包含 `${table}` 占位符的值(例如 `topic = "${table}"`),每张输入表就会被写到同名 DataHub topic。`${table_name}` 仍然作为已废弃的别名可以识别——新任务建议使用 `${table}`。该连接器不会自动创建目标 topic,请提前在 DataHub 项目中创建好,并保证其字段名与上游 SeaTunnel schema 一致。 +当上游 source 输出多张表时,把 `topic` 设置成包含 `${table_name}` 占位符的值(例如 `topic = "${table_name}"`),每张输入表就会被写到同名 DataHub topic。该连接器不会自动创建目标 topic,请提前在 DataHub 项目中创建好,并保证其字段名与上游 SeaTunnel schema 一致。 ### 为什么单表任务 `topic` 也是必填? diff --git a/docs/zh/connectors/sink/DuckDB.md b/docs/zh/connectors/sink/DuckDB.md index 6cf6ff41fdb7..1ab30cfa88c7 100644 --- a/docs/zh/connectors/sink/DuckDB.md +++ b/docs/zh/connectors/sink/DuckDB.md @@ -46,17 +46,22 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | SeaTunnel 数据类型 | DuckDB 数据类型 | |---------------------------------|----------------| | BOOLEAN | BOOLEAN | -| TINYINT
SMALLINT
INT | INTEGER | +| TINYINT | TINYINT | +| SMALLINT | SMALLINT | +| INT | INTEGER | | BIGINT | BIGINT | | DECIMAL(x,y)(获取指定列的指定列大小.<38) | DECIMAL(x,y) | -| DECIMAL(x,y)(获取指定列的指定列大小.>38) | DECIMAL(38,18) | +| DECIMAL(x,y)(获取指定列的指定列大小.>38) | DECIMAL(38,y) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | | STRING | VARCHAR | | DATE | DATE | | TIME | TIME | | TIMESTAMP | TIMESTAMP | -| BYTES
ARRAY
ROW
MAP | BLOB | +| TIMESTAMP_TZ | TIMESTAMP WITH TIME ZONE | +| BYTES | BLOB | + +> 复杂 SeaTunnel 类型(`ARRAY`、`ROW`、`MAP`)暂不支持写入 DuckDB。 ## Sink 选项 diff --git a/docs/zh/connectors/sink/Hudi.md b/docs/zh/connectors/sink/Hudi.md index adf7b4ee2f3e..801690ad08ce 100644 --- a/docs/zh/connectors/sink/Hudi.md +++ b/docs/zh/connectors/sink/Hudi.md @@ -107,7 +107,7 @@ SeaTunnel Hudi sink 会写入 Hudi 数据文件和 `.hoodie` 元数据,但不 ### op_type [enum] -`op_type` Hudi 表的操作类型。值可以是 `insert`、`upsert` 或 `bulk_insert`。 +`op_type` Hudi 表的操作类型。值可以是 `INSERT`、`UPSERT` 或 `BULK_INSERT`。 ### batch_interval_ms [Int] diff --git a/docs/zh/connectors/sink/Jdbc.md b/docs/zh/connectors/sink/Jdbc.md index cf422e5b8bae..ae9630a5230c 100644 --- a/docs/zh/connectors/sink/Jdbc.md +++ b/docs/zh/connectors/sink/Jdbc.md @@ -255,8 +255,8 @@ Postgres 9.5及以下版本,请设置为 `postgresLow` 来支持 CDC | SqlServer | Tablestore | Teradata | | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | -| DSQL | | | -| YashanDB | | | +| OpenGauss | Presto | Dsql | +| DuckDB | DSQL | YashanDB | ### database [string] diff --git a/docs/zh/connectors/sink/Kafka.md b/docs/zh/connectors/sink/Kafka.md index 393123df9637..964149380bb6 100644 --- a/docs/zh/connectors/sink/Kafka.md +++ b/docs/zh/connectors/sink/Kafka.md @@ -503,7 +503,7 @@ sink { ### Kafka Sink 支持哪些消息格式? -支持:`json`、`text`、`canal_json`、`debezium_json`、`ogg_json`、`avro`、`protobuf` 和 `NATIVE`。当上游数据已经是带 headers、key 和 value 字节字段的 Kafka 原生格式时,使用 `NATIVE` 格式。 +支持:`json`、`text`、`canal_json`、`debezium_json`、`compatible_debezium_json`、`ogg_json`、`maxwell_json`、`avro`、`protobuf` 和 `NATIVE`。当上游数据已经是带 headers、key 和 value 字节字段的 Kafka 原生格式时,使用 `NATIVE` 格式。 ## 变更日志 diff --git a/docs/zh/connectors/sink/Prometheus.md b/docs/zh/connectors/sink/Prometheus.md index 04d4125b346f..4bb402a5c353 100644 --- a/docs/zh/connectors/sink/Prometheus.md +++ b/docs/zh/connectors/sink/Prometheus.md @@ -47,7 +47,7 @@ Prometheus 数据接收器把上游数据写入 Prometheus remote write API。 | key_value | String | 是 | - | 上游数据中保存 Prometheus 指标值的字段名。推荐使用 `double` 类型字段。 | | key_timestamp | String | 否 | - | 上游数据中保存 Prometheus 指标时间戳的字段名。不配置时使用当前系统时间。 | | headers | Map | 否 | - | HTTP 请求头。 | -| retry | Int | 否 | 3 | remote-write 请求失败时的最大重试次数。会重试传输层 `IOException` 以及可重试的 HTTP 状态码(`5xx` 和 `429`);其他 `4xx` 响应会快速失败。设为 `0` 可禁用重试。 | +| retry | Int | 否 | - | remote-write 请求失败时的最大重试次数。默认未设置:请求只尝试一次,不进行重试。重试会覆盖传输层 `IOException` 以及可重试的 HTTP 状态码(`5xx` 和 `429`);其他 `4xx` 响应会快速失败。设为 `0` 可显式禁用重试。 | | retry_backoff_multiplier_ms | Int | 否 | 100 | 重试退避时间倍数,单位毫秒。 | | retry_backoff_max_ms | Int | 否 | 10000 | 最大重试退避时间,单位毫秒。 | | batch_size | Int | 否 | 1024 | 写入 Prometheus 前缓存的行数,必须大于 0。 | diff --git a/docs/zh/connectors/sink/Sls.md b/docs/zh/connectors/sink/Sls.md index 3985bf21d035..a170bae064d5 100644 --- a/docs/zh/connectors/sink/Sls.md +++ b/docs/zh/connectors/sink/Sls.md @@ -40,6 +40,7 @@ JSON,然后作为 SLS 日志项写入,日志内容的 key 为 `content`。 | access_key_secret | String | 是 | - | 阿里云 AccessKey Secret。值不能为空或仅包含空白字符。 | | source | String | 否 | `SeaTunnel-Source` | 写入 SLS log group 的 source 标记。 | | topic | String | 否 | `SeaTunnel-Topic` | 写入 SLS log group 的 topic 标记。 | +| log_group_size | Int | 否 | 100 | 写入时批量聚合日志使用的 SLS log group 大小。 | ## 注意事项 diff --git a/docs/zh/connectors/sink/Snowflake.md b/docs/zh/connectors/sink/Snowflake.md index 24fd79e56971..eb295f7dfeb4 100644 --- a/docs/zh/connectors/sink/Snowflake.md +++ b/docs/zh/connectors/sink/Snowflake.md @@ -43,14 +43,16 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, 18) | +| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | | DATE | DATE | | TIME | TIME | -| DATETIME
TIMESTAMP
TIMESTAMP_LTZ
TIMESTAMP_NTZ
TIMESTAMP_TZ | TIMESTAMP | -| BINARY
VARBINARY
GEOGRAPHY
GEOMETRY | BYTES | +| DATETIME
TIMESTAMP
TIMESTAMP_NTZ | TIMESTAMP | +| TIMESTAMP_LTZ
TIMESTAMP_TZ | TIMESTAMP_TZ | +| BINARY
VARBINARY | BYTES | +| GEOGRAPHY
GEOMETRY | STRING | ## 选项 diff --git a/docs/zh/connectors/sink/SqlServer.md b/docs/zh/connectors/sink/SqlServer.md index d6f65eab50f1..c51b9e02cda6 100644 --- a/docs/zh/connectors/sink/SqlServer.md +++ b/docs/zh/connectors/sink/SqlServer.md @@ -62,8 +62,10 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | CHAR
NCHAR
VARCHAR
NTEXT
NVARCHAR
TEXT | STRING | | DATE | LOCAL_DATE | | TIME | LOCAL_TIME | -| DATETIME
DATETIME2
SMALLDATETIME
DATETIMEOFFSET | LOCAL_DATE_TIME | -| TIMESTAMP
BINARY
VARBINARY
IMAGE
UNKNOWN | 尚未支持 | +| DATETIME
DATETIME2
SMALLDATETIME | LOCAL_DATE_TIME | +| DATETIMEOFFSET | OFFSET_DATE_TIME | +| BINARY
VARBINARY
IMAGE
TIMESTAMP | BYTES | +| UNKNOWN | 尚未支持 | ## 接收器选项 diff --git a/docs/zh/connectors/source/DB2.md b/docs/zh/connectors/source/DB2.md index 1ab3e67e2594..fd48c8dde4c6 100644 --- a/docs/zh/connectors/source/DB2.md +++ b/docs/zh/connectors/source/DB2.md @@ -72,7 +72,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | driver | String | 是 | - | JDBC 驱动类名,DB2 使用 `com.ibm.db2.jcc.DB2Driver`。 | | username | String | 否 | - | DB2 用户名。`user` 也可作为 `username` 的备选键。 | | password | String | 否 | - | DB2 密码。 | -| query | String | 是 | - | 读取数据的 SELECT 语句。SELECT 的列列表决定输出 schema,只选择需要的列即可。 | +| query | String | 否 | - | 读取数据的 SELECT 语句。SELECT 的列列表决定输出 schema,只选择需要的列即可。未配置 `table_path` 或 `table_list` 时必填。 | | connection_check_timeout_sec | Int | 否 | 30 | 连接校验超时时间(秒),超过该时间未完成则失败。 | | partition_column | String | 否 | - | 用于并行拆分读取的列。支持数值列和字符串列(配合 `split.string_split_mode` 使用);只能配置一列。 | | partition_lower_bound | String | 否 | - | `partition_column` 的下界,用于范围拆分;不设置时 SeaTunnel 查询最小值。 | diff --git a/docs/zh/connectors/source/DuckDB.md b/docs/zh/connectors/source/DuckDB.md index 4278e39f13a9..fe669da88a8d 100644 --- a/docs/zh/connectors/source/DuckDB.md +++ b/docs/zh/connectors/source/DuckDB.md @@ -51,20 +51,24 @@ import ChangeLog from '../changelog/connector-jdbc.md'; |----------------------------------------------------------|----------------| | BOOLEAN | BOOLEAN | | TINYINT | TINYINT | -| UTINYINT
SMALLINT | SMALLINT | -| USMALLINT
INTEGER | INT | -| UINTEGER
BIGINT | BIGINT | -| UBIGINT | DECIMAL(20,0) | +| UTINYINT | TINYINT | +| SMALLINT | SMALLINT | +| USMALLINT | SMALLINT | +| INTEGER | INT | +| UINTEGER | INT | +| BIGINT
UBIGINT | BIGINT | | HUGEINT | DECIMAL(38,0) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | | DECIMAL(x,y)(获取指定列的指定列大小.<38) | DECIMAL(x,y) | -| DECIMAL(x,y)(获取指定列的指定列大小.>38) | DECIMAL(38,18) | +| DECIMAL(x,y)(获取指定列的指定列大小.>38) | DECIMAL(38,y) | | VARCHAR
CHAR
TEXT
JSON
UUID
INTERVAL | STRING | | DATE | DATE | | TIME | TIME | -| TIMESTAMP
TIMESTAMP WITH TIME ZONE | TIMESTAMP | -| BLOB
ARRAY
STRUCT
MAP | BYTES | +| TIMESTAMP | TIMESTAMP | +| TIMESTAMP WITH TIME ZONE | TIMESTAMP_TZ | +| BLOB | BYTES | +| ARRAY
STRUCT
MAP | STRING | ## 源选项 @@ -74,7 +78,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | driver | String | 是 | - | 用于连接到远程数据源的 jdbc 类名,
如果您使用 DuckDB,值为 `org.duckdb.DuckDBDriver`。 | | username | String | 否 | - | 连接实例用户名 | | password | String | 否 | - | 连接实例密码 | -| query | String | 是 | - | 查询语句 | +| query | String | 否 | - | 查询语句。未配置 `table_path` 或 `table_list` 时必填。 | | connection_check_timeout_sec | Int | 否 | 30 | 等待用于验证连接的数据库操作完成的时间(以秒为单位) | | partition_column | String | 否 | - | 并行度分区的列名,仅支持数字类型主键,并且只能配置一列。 | | partition_lower_bound | String | 否 | - | 扫描的 partition_column 最小值,如果未设置,SeaTunnel 将查询数据库获取最小值。 | diff --git a/docs/zh/connectors/source/HiveJdbc.md b/docs/zh/connectors/source/HiveJdbc.md index 74d3e35cc053..400113142be3 100644 --- a/docs/zh/connectors/source/HiveJdbc.md +++ b/docs/zh/connectors/source/HiveJdbc.md @@ -76,8 +76,8 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | socket_timeout_ms | Int | 否 | 86400000 | 从服务器读取数据的 Socket 超时时间(毫秒)。设置为 `0` 表示无超时。已在 Hive 3.2.0+ 测试,更早版本暂未验证。 | | connect_timeout_ms | Int | 否 | 86400000 | 建立到服务器的连接超时时间(毫秒)。设置为 `0` 表示无超时。已在 Hive 3.2.0+ 测试,更早版本暂未验证。 | | partition_column | String | 否 | - | 并行分区的列名,仅支持数值类型主键,且只能配置一列。 | -| partition_lower_bound | BigDecimal | 否 | - | 扫描的分区列最小值。如果未设置,SeaTunnel 将查询数据库获取最小值。 | -| partition_upper_bound | BigDecimal | 否 | - | 扫描的分区列最大值。如果未设置,SeaTunnel 将查询数据库获取最大值。 | +| partition_lower_bound | String | 否 | - | 扫描的分区列最小值。如果未设置,SeaTunnel 将查询数据库获取最小值。 | +| partition_upper_bound | String | 否 | - | 扫描的分区列最大值。如果未设置,SeaTunnel 将查询数据库获取最大值。 | | partition_num | Int | 否 | 10 | 分区数量,仅支持正整数。默认值是 10。 | | fetch_size | Int | 否 | 0 | 对于返回大量行的查询,可配置 JDBC 一次获取的行数,通过减少访问数据库的次数来提升性能。`0` 表示使用 JDBC 驱动默认。 | | common-options | | 否 | - | 源插件常用参数,请参考 [源通用选项](../common-options/source-common-options.md)。 | diff --git a/docs/zh/connectors/source/Jdbc.md b/docs/zh/connectors/source/Jdbc.md index 82c1cf5ea1f6..b82090a0a153 100644 --- a/docs/zh/connectors/source/Jdbc.md +++ b/docs/zh/connectors/source/Jdbc.md @@ -284,7 +284,8 @@ int_type_narrowing = false | SqlServer | Tablestore | Teradata | | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | -| YashanDB | | | +| OpenGauss | Presto | Dsql | +| DuckDB | YashanDB | | 达梦 `NCHAR` 源字段会映射为 SeaTunnel `STRING`。 diff --git a/docs/zh/connectors/source/Kafka.md b/docs/zh/connectors/source/Kafka.md index 73572e04be56..38b1e96e4bb7 100644 --- a/docs/zh/connectors/source/Kafka.md +++ b/docs/zh/connectors/source/Kafka.md @@ -66,7 +66,7 @@ header 字段和事件时间元数据。 | poll.timeout | Long | 否 | 10000 | kafka主动拉取时间间隔(毫秒)。 | | kafka.config | Map | 否 | - | 除了上述必要参数外,用户还可以指定多个非强制的消费者客户端参数,覆盖 [Kafka 官方文档](https://kafka.apache.org/documentation.html#consumerconfigs) 中指定的所有消费者参数。 | | schema | Config | 否 | - | 数据结构,包括字段名称和字段类型。更多详情请参考 [Schema 特性](../../introduction/concepts/schema-feature.md)。 | -| format | String | 否 | json | 数据格式。默认格式为 json。可选格式包括 text, canal_json, debezium_json, ogg_json, maxwell_json, avro , protobuf和native。默认字段分隔符为 ", "。如果自定义分隔符,添加 "field_delimiter" 选项。如果使用 canal 格式,请参考 [canal-json](../formats/canal-json.md) 了解详细信息。如果使用 debezium 格式,请参考 [debezium-json](../formats/debezium-json.md)。一些Format的详细信息请参考 [formats](../formats) | +| format | String | 否 | json | 数据格式。默认格式为 json。可选格式包括 text, canal_json, debezium_json, compatible_kafka_connect_json, ogg_json, maxwell_json, avro, protobuf和native。默认字段分隔符为 ", "。如果自定义分隔符,添加 "field_delimiter" 选项。如果使用 canal 格式,请参考 [canal-json](../formats/canal-json.md) 了解详细信息。如果使用 debezium 格式,请参考 [debezium-json](../formats/debezium-json.md)。一些Format的详细信息请参考 [formats](../formats) | | avro_schema | String | 否 | - | 当 `format` 为 `avro` 时生效。用于提供二进制 Avro 消息的 writer schema,适用于消息的 record 名称、namespace 或 union 结构与 SeaTunnel schema 不完全一致的场景。 | | value_converter_schema_enabled | Boolean | 否 | true | 仅在 `format = compatible_kafka_connect_json` 时生效。Kafka Connect value 转换后的 JSON 载荷是否携带 schema。 | | format_error_handle_way | String | 否 | fail | 数据格式错误的处理方式。默认值为 fail,可选值为 fail 和 skip。当选择 fail 时,数据格式错误将阻塞并抛出异常。当选择 skip 时,数据格式错误将跳过此行数据。 | diff --git a/docs/zh/connectors/source/Mysql.md b/docs/zh/connectors/source/Mysql.md index fa416247b341..49b3c28daaf7 100644 --- a/docs/zh/connectors/source/Mysql.md +++ b/docs/zh/connectors/source/Mysql.md @@ -78,9 +78,9 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | query | String | 否 | - | 查询语句。当未配置 `table_path` 和 `table_list` 时必填。 | | connection_check_timeout_sec | Int | 否 | 30 | 验证数据库连接所使用的操作完成的等待时间(秒)。 | | partition_column | String | 否 | - | 用于并行度分区的列名,仅支持数字类型,仅支持数字类型的主键,并且只能配置一列。 | -| partition_lower_bound | BigDecimal | 否 | - | 扫描时 `partition_column` 的最小值,如果未设置,`SeaTunnel` 将查询数据库以获取最小值。 | -| partition_upper_bound | BigDecimal | 否 | - | 扫描时 `partition_column` 的最大值,如果未设置,`SeaTunnel` 将查询数据库以获取最大值。 | -| partition_num | Int | 否 | 作业并行度 | 分区数量,仅支持正整数。
默认值为作业并行度。 | +| partition_lower_bound | String | 否 | - | 扫描时 `partition_column` 的最小值,如果未设置,`SeaTunnel` 将查询数据库以获取最小值。 | +| partition_upper_bound | String | 否 | - | 扫描时 `partition_column` 的最大值,如果未设置,`SeaTunnel` 将查询数据库以获取最大值。 | +| partition_num | Int | 否 | 10 | 分区数量,仅支持正整数。
默认值为 10。 | | fetch_size | Int | 否 | 0 | 对于返回大量对象的查询,可以配置查询的行提取大小,以通过减少满足选择条件所需的数据库访问次数来提高性能。
设置为零表示使用 `JDBC` 的默认值。 | | properties | Map | 否 | - | 额外的连接配置参数,当属性和 URL 中有相同的参数时,优先级由驱动程序的具体实现决定。
例如,在 MySQL 中,属性优先于 URL。 | | use_regex | Boolean | 否 | false | 控制表路径的正则表达式匹配。当设置为true时,table_path 将被视为正则表达式模式。当设置为false或未指定时,table_path 将被视为精确路径(不进行正则匹配)。 | @@ -160,11 +160,11 @@ JDBC 源连接器支持从表中并行读取数据。SeaTunnel 将使用特定 拆分数据的列名称。 -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] 扫描时 `partition_column` 的最大值。如果未设置,SeaTunnel 将查询数据库以获取最大值。 -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] 扫描时 `partition_column` 的最小值。如果未设置,SeaTunnel 将查询数据库以获取最小值。 @@ -172,7 +172,7 @@ JDBC 源连接器支持从表中并行读取数据。SeaTunnel 将使用特定 > 不推荐使用,正确的方法是通过 `split.size` 来控制分片的数量。 -需要拆分成多少个分片,只支持正整数。默认值为作业并行度。 +需要拆分成多少个分片,只支持正整数。默认值为 10。 ## 提示 diff --git a/docs/zh/connectors/source/OceanBase.md b/docs/zh/connectors/source/OceanBase.md index 8b4a424cf64e..22b8256227d6 100644 --- a/docs/zh/connectors/source/OceanBase.md +++ b/docs/zh/connectors/source/OceanBase.md @@ -91,9 +91,9 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | where_condition | String | 否 | - | 所有表或查询共用的过滤条件,必须以 `where` 开头,例如 `where id > 100`。 | | connection_check_timeout_sec | Int | 否 | 30 | 等待用于验证连接的数据库操作完成的时间(秒) | | partition_column | String | 否 | - | 用于并行性分割的列名,仅支持数值类型列和字符串类型列。 | -| partition_lower_bound | BigDecimal | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | -| partition_upper_bound | BigDecimal | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | -| partition_num | Int | 否 | job parallelism | 分片数量,仅支持正整数。使用 `table_path` 读取时,推荐通过 `split.size` 控制单个分片大小。 | +| partition_lower_bound | String | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | +| partition_upper_bound | String | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | +| partition_num | Int | 否 | 10 | 分片数量,仅支持正整数。使用 `table_path` 读取时,推荐通过 `split.size` 控制单个分片大小。 | | fetch_size | Int | 否 | 0 | 对于返回大量对象的查询,您可以配置查询中使用的行提取大小,以通过减少满足选择条件所需的数据库命中次数来提高性能。零表示使用 jdbc 默认值。 | | split.size | Int | 否 | 8096 | 使用 `table_path` 读取时,每个分片包含的行数。 | | split.even-distribution.factor.lower-bound | Double | 否 | 0.05 | 判断分片键数据是否均匀分布的下限。 | diff --git a/docs/zh/connectors/source/Oracle.md b/docs/zh/connectors/source/Oracle.md index fd66bbbaac48..2d971e0e784e 100644 --- a/docs/zh/connectors/source/Oracle.md +++ b/docs/zh/connectors/source/Oracle.md @@ -72,8 +72,8 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | query | String | 否 | - | 查询语句。当未配置 `table_path` 和 `table_list` 时必填。 | | connection_check_timeout_sec | Int | 否 | 30 | 等待用于验证连接的数据库操作完成的时间(秒) | | partition_column | String | 否 | - | 用于并行性分割的列名,仅支持数值类型,仅支持数值类型主键,只能配置一列。 | -| partition_lower_bound | BigDecimal | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | -| partition_upper_bound | BigDecimal | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | +| partition_lower_bound | String | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | +| partition_upper_bound | String | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | | partition_num | Int | 否 | 10 | 分割数量,仅支持正整数。默认值是 10。 | | fetch_size | Int | 否 | 0 | 对于返回大量对象的查询,您可以配置查询中使用的行提取大小,以通过减少满足选择条件所需的数据库命中次数来提高性能。零表示使用 jdbc 默认值。 | | properties | Map | 否 | - | 其他连接配置参数,当 properties 和 URL 具有相同参数时,优先级由驱动程序的具体实现确定。例如,在 Oracle 中,properties 优先于 URL。 | @@ -156,11 +156,11 @@ JDBC Source 连接器支持并行读取表数据。SeaTunnel 会按一定规则 用于分片的列名。 -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] `partition_column` 的扫描最大值。未设置时 SeaTunnel 会查询数据库获取。 -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] `partition_column` 的扫描最小值。未设置时 SeaTunnel 会查询数据库获取。 diff --git a/docs/zh/connectors/source/PostgreSQL-CDC.md b/docs/zh/connectors/source/PostgreSQL-CDC.md index 1f7c2855bcb8..9229600a808f 100644 --- a/docs/zh/connectors/source/PostgreSQL-CDC.md +++ b/docs/zh/connectors/source/PostgreSQL-CDC.md @@ -101,7 +101,7 @@ ALTER TABLE your_table_name REPLICA IDENTITY FULL; | snapshot.fetch.size | Integer | 否 | 1024 | 读取表快照时每次轮询的最大获取大小。 | | slot.name | String | 否 | seatunnel | PostgreSQL 逻辑解码槽名称。同一个 PostgreSQL 实例上如果有多个 CDC 任务,请为每个任务配置不同的 `slot.name`。 | | decoding.plugin.name | String | 否 | pgoutput | 安装在服务器上的 Postgres 逻辑解码插件的名称,支持的值有 decoderbufs、wal2json、wal2json_rds、wal2json_streaming、wal2json_rds_streaming 和 pgoutput。 | -| server-time-zone | String | 否 | UTC | 数据库服务器中的会话时区。如果未设置,则使用 ZoneId.systemDefault() 来确定服务器时区。 | +| server-time-zone | String | 否 | - | 数据库服务器中的会话时区。如果未设置,则使用 ZoneId.systemDefault() 来确定服务器时区。 | | connect.timeout.ms | Duration | 否 | 30000 | 连接器在尝试连接到数据库服务器后应等待的最大时间,以防超时。 | | connect.max-retries | Integer | 否 | 3 | 连接器应重试建立数据库服务器连接的最大重试次数。 | | connection.pool.size | Integer | 否 | 20 | JDBC 连接池大小。 | diff --git a/docs/zh/connectors/source/Pulsar.md b/docs/zh/connectors/source/Pulsar.md index 1badcd636ae4..8d7ec9ca5646 100644 --- a/docs/zh/connectors/source/Pulsar.md +++ b/docs/zh/connectors/source/Pulsar.md @@ -393,7 +393,7 @@ source { ### 支持哪些消费游标(Cursor)位点恢复与订阅模式? -通过 `cursor.startup.mode` 支持配置为 `EARLIEST`(从最早未消费位点)或 `LATEST`(从最新位点开始消费)。消费者以配置的订阅类型(如 `Failover` 或 `Exclusive`)注册,并在 Checkpoint 时同步保存消息 ID,确保故障时精准回溯。 +通过 `cursor.startup.mode` 支持配置为 `EARLIEST`(从最早未消费位点)、`LATEST`(从最新位点开始消费)、`SUBSCRIPTION`(从指定订阅已提交位点)或 `TIMESTAMP`(从指定位点时间戳)。消费者以配置的订阅类型(如 `Failover` 或 `Exclusive`)注册,并在 Checkpoint 时同步保存消息 ID,确保故障时精准回溯。 ### 如何在连接受安全防护的 Pulsar 集群时配置身份认证? diff --git a/docs/zh/connectors/source/RocketMQ.md b/docs/zh/connectors/source/RocketMQ.md index 011631bad031..ac9424dca298 100644 --- a/docs/zh/connectors/source/RocketMQ.md +++ b/docs/zh/connectors/source/RocketMQ.md @@ -285,7 +285,7 @@ sink { ### RocketMQ 源连接器支持哪些起始消费位点模式? -通过 `start.mode` 参数支持从最早位点(`CONSUME_FROM_FIRST_OFFSET`)、最新位点(`CONSUME_FROM_LAST_OFFSET`)或指定时间戳位点(`CONSUME_FROM_TIMESTAMP`)开始读取数据。 +通过 `start.mode` 参数支持从消费组位点(`CONSUME_FROM_GROUP_OFFSETS`,默认值)、最早位点(`CONSUME_FROM_FIRST_OFFSET`)、最新位点(`CONSUME_FROM_LAST_OFFSET`)、指定位点时间戳(`CONSUME_FROM_TIMESTAMP`,配合 `start.mode.timestamp`)或指定位点(`CONSUME_FROM_SPECIFIC_OFFSETS`,配合 `start.mode.offsets`)开始读取数据。 ### 作业发生故障恢复时如何保证消费位点一致性? diff --git a/docs/zh/connectors/source/Snowflake.md b/docs/zh/connectors/source/Snowflake.md index 82bb055975c7..214b54623659 100644 --- a/docs/zh/connectors/source/Snowflake.md +++ b/docs/zh/connectors/source/Snowflake.md @@ -45,16 +45,16 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, 18) | +| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | | DATE | DATE | | TIME | TIME | -| DATETIME
TIMESTAMP
TIMESTAMP_LTZ
TIMESTAMP_NTZ
TIMESTAMP_TZ | TIMESTAMP | +| DATETIME
TIMESTAMP
TIMESTAMP_NTZ | TIMESTAMP | +| TIMESTAMP_LTZ
TIMESTAMP_TZ | TIMESTAMP_TZ | | BINARY
VARBINARY | BYTES | -| GEOGRAPHY (WKB 或 EWKB)
GEOMETRY (WKB 或 EWKB) | BYTES | -| GEOGRAPHY (GeoJSON, WKT 或 EWKT)
GEOMETRY (GeoJSON, WKB 或 EWKB) | STRING | +| GEOGRAPHY
GEOMETRY | STRING | ## 源选项 @@ -64,7 +64,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | driver | String | 是 | - | JDBC 驱动类名,Snowflake 使用 `net.snowflake.client.jdbc.SnowflakeDriver`。 | | username | String | 否 | - | Snowflake 账户用户名。 | | password | String | 否 | - | Snowflake 账户密码。 | -| query | String | 是 | - | 读取数据的 SELECT 语句。SELECT 的列列表决定输出 schema,只选择需要的列即可。 | +| query | String | 否 | - | 读取数据的 SELECT 语句。未配置 `table_path` 或 `table_list` 时必填。SELECT 的列列表决定输出 schema,只选择需要的列即可。 | | connection_check_timeout_sec | Int | 否 | 30 | 连接校验超时时间(秒),超过该时间未完成则失败。 | | partition_column | String | 否 | - | 用于并行拆分读取的列。支持数值列和字符串列(配合 `split.string_split_mode` 使用);只能配置一列。 | | partition_lower_bound | String | 否 | - | `partition_column` 的下界,用于范围拆分;不设置时 SeaTunnel 查询最小值。 | diff --git a/docs/zh/connectors/source/SqlServer.md b/docs/zh/connectors/source/SqlServer.md index 6c13959aecaf..9b4cb8e4b8bf 100644 --- a/docs/zh/connectors/source/SqlServer.md +++ b/docs/zh/connectors/source/SqlServer.md @@ -79,9 +79,9 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | query | String | 否 | - | 查询语句。当未配置 `table_path` 和 `table_list` 时必填。 | | connection_check_timeout_sec | Int | 否 | 30 | 等待用于验证连接的数据库操作完成的时间(秒)。 | | partition_column | String | 否 | - | 用于并行度分区的列名,仅支持数值类型。 | -| partition_lower_bound | Long | 否 | - | `partition_column` 扫描的最小值,如果未设置,SeaTunnel 将查询数据库获取最小值。 | -| partition_upper_bound | Long | 否 | - | `partition_column` 扫描的最大值,如果未设置,SeaTunnel 将查询数据库获取最大值。 | -| partition_num | Int | 否 | job parallelism | 分区数量,仅支持正整数。默认值为作业并行度。 | +| partition_lower_bound | String | 否 | - | `partition_column` 扫描的最小值,如果未设置,SeaTunnel 将查询数据库获取最小值。 | +| partition_upper_bound | String | 否 | - | `partition_column` 扫描的最大值,如果未设置,SeaTunnel 将查询数据库获取最大值。 | +| partition_num | Int | 否 | 10 | 分区数量,仅支持正整数。默认值为 10。 | | fetch_size | Int | 否 | 0 | 查询使用的行获取大小。`0` 表示使用 JDBC 默认值。增大可减少对数据库的命中次数。 | | properties | Map | 否 | - | 额外的连接配置参数。当 properties 与 URL 含相同参数时,由驱动的具体实现决定优先级。 | | use_regex | Boolean | 否 | false | 控制 `table_path` 的正则匹配。`true` 时按正则匹配,`false`(默认)时按精确路径匹配。 | @@ -143,11 +143,11 @@ JDBC 源连接器支持从表中并行读取数据。SeaTunnel 将使用某些 用于分割数据的列名。 -#### partition_upper_bound [BigDecimal] +#### partition_upper_bound [string] `partition_column` 扫描的最大值。如果未设置,SeaTunnel 将查询数据库获取最大值。 -#### partition_lower_bound [BigDecimal] +#### partition_lower_bound [string] `partition_column` 扫描的最小值。如果未设置,SeaTunnel 将查询数据库获取最小值。 @@ -155,7 +155,7 @@ JDBC 源连接器支持从表中并行读取数据。SeaTunnel 将使用某些 > 不推荐使用,正确的方法是通过 `split.size` 控制分割数量 -需要分割为多少个 split,仅支持正整数。默认值为作业并行度。 +需要分割为多少个 split,仅支持正整数。默认值为 10。 ## 提示 diff --git a/docs/zh/connectors/source/Vertica.md b/docs/zh/connectors/source/Vertica.md index 85e2601c7c3d..853306853a0e 100644 --- a/docs/zh/connectors/source/Vertica.md +++ b/docs/zh/connectors/source/Vertica.md @@ -72,9 +72,9 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | query | String | 是 | - | 查询语句 | | connection_check_timeout_sec | Int | 否 | 30 | 等待用于验证连接的数据库操作完成的时间(秒) | | partition_column | String | 否 | - | 用于并行性分割的列名,仅支持数值类型,仅支持数值类型主键,只能配置一列。 | -| partition_lower_bound | BigDecimal | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | -| partition_upper_bound | BigDecimal | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | -| partition_num | Int | 否 | job parallelism | 分割数量,仅支持正整数。默认值是任务并行度。 | +| partition_lower_bound | String | 否 | - | partition_column 的最小值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最小值。 | +| partition_upper_bound | String | 否 | - | partition_column 的最大值用于扫描,如果未设置,SeaTunnel 将查询数据库获取最大值。 | +| partition_num | Int | 否 | 10 | 分割数量,仅支持正整数。默认值是 10。 | | fetch_size | Int | 否 | 0 | 对于返回大量对象的查询,您可以配置查询中使用的行提取大小,以通过减少满足选择条件所需的数据库命中次数来提高性能。零表示使用 jdbc 默认值。 | | properties | Map | 否 | - | 其他连接配置参数,当 properties 和 URL 具有相同参数时,优先级由驱动程序的具体实现确定。例如,在 MySQL 中,properties 优先于 URL。 | | common-options | | 否 | - | 源插件通用参数,请参考 [源通用选项](../common-options/source-common-options.md) 详见。 | diff --git a/docs/zh/engines/zeta/hybrid-cluster-deployment.md b/docs/zh/engines/zeta/hybrid-cluster-deployment.md index f17b1d248383..1ba7a7579edb 100644 --- a/docs/zh/engines/zeta/hybrid-cluster-deployment.md +++ b/docs/zh/engines/zeta/hybrid-cluster-deployment.md @@ -395,7 +395,7 @@ mkdir -p $SEATUNNEL_HOME/logs ./bin/seatunnel-cluster.sh -d ``` -日志将写入 `$SEATUNNEL_HOME/logs/seatunnel-engine-server.log` +日志将写入 `$SEATUNNEL_HOME/logs/` 目录(例如 `seatunnel-engine-master.log` 和 `seatunnel-engine-worker.log`) ## 8. 提交作业和管理作业 diff --git a/docs/zh/engines/zeta/log-analysis-with-ai.md b/docs/zh/engines/zeta/log-analysis-with-ai.md index 68df847aa83a..c5875a12ca7f 100644 --- a/docs/zh/engines/zeta/log-analysis-with-ai.md +++ b/docs/zh/engines/zeta/log-analysis-with-ai.md @@ -46,7 +46,8 @@ SeaTunnel 默认将进程日志写入 `$SEATUNNEL_HOME/logs`。集群启动脚 ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-server.log" > job.log +grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-master.log" \ + "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log ``` 如果启用了按作业路由,请检查 `job-.log`。在多节点 Zeta 集群中,需要同时收集 Master 和执行该作业的 Worker 日志。当前 Master 还提供以下 REST 接口: @@ -54,7 +55,7 @@ grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-server.log" > job.l ```text GET http://:8080/logs/ GET http://:8080/logs?format=json -GET http://:5801/log +GET http://:8080/log ``` 第一个接口从所有 Zeta 节点获取匹配的日志,最后一个接口读取单个节点的日志。如果配置了 context path 或动态 HTTP 端口,接口地址也会变化。完整行为请参阅 [RESTful API V2](rest-api-v2.md#获取所有节点日志内容)。 diff --git a/docs/zh/engines/zeta/logging.md b/docs/zh/engines/zeta/logging.md index d1cfcdce225c..fa4b6273b965 100644 --- a/docs/zh/engines/zeta/logging.md +++ b/docs/zh/engines/zeta/logging.md @@ -116,7 +116,7 @@ SeaTunnel 提供了一个 API,用于查询日志。 ### 定时删除旧日志 -SeaTunnel 支持定时删除旧日志文件,以避免磁盘空间不足。您可以在 `seatunnel.yml` 文件中添加以下配置: +SeaTunnel 支持定时删除旧日志文件,以避免磁盘空间不足。您可以在 `seatunnel.yaml` 文件中添加以下配置: ```yaml seatunnel: diff --git a/docs/zh/engines/zeta/resource-isolation.md b/docs/zh/engines/zeta/resource-isolation.md index b009fe605aae..91bddc6ba0cb 100644 --- a/docs/zh/engines/zeta/resource-isolation.md +++ b/docs/zh/engines/zeta/resource-isolation.md @@ -47,7 +47,7 @@ SeaTunnel支持对每个实例添加`tag`, 然后在提交任务时可以在配 2. 在任务的配置中添加`tag_filter`来选择你需要运行该任务的节点 -```hacon +```hocon env { parallelism = 1 job.mode = "BATCH" diff --git a/docs/zh/engines/zeta/rest-api-job-lifecycle.md b/docs/zh/engines/zeta/rest-api-job-lifecycle.md index 6932ed8231b7..8efd724c587f 100644 --- a/docs/zh/engines/zeta/rest-api-job-lifecycle.md +++ b/docs/zh/engines/zeta/rest-api-job-lifecycle.md @@ -148,7 +148,7 @@ curl http://:8080/job-info/ |---|---| | `jobId` | 作业唯一标识 | | `jobName` | 作业名称 | -| `jobStatus` | `RUNNING`、`FINISHED`、`FAILED`、`CANCELLED` | +| `jobStatus` | `RUNNING`、`FINISHED`、`FAILED`、`CANCELED` | | `envOptions` | 生效的 env 配置 | | `createTime` | 作业创建时间戳 | | `jobDag` | DAG 拓扑结构 | @@ -224,12 +224,8 @@ curl -X POST "http://:8080/stop-job" \ -d '{"jobId": "733584788375093248", "isStopWithSavePoint": true}' ``` -Savepoint 路径会打印在作业日志中,也可通过查询已完成作业获取: - -```bash -curl http://:8080/job-info/733584788375093248 | \ - python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('savepointPath', 'N/A'))" -``` +Savepoint 数据会写入 checkpoint storage 中该作业对应的目录(`jobId`)。具体位置取决于配置的 +`checkpoint.storage` namespace;触发 Savepoint 的操作也会记录在引擎服务端日志中。 ### 5.3 强制取消 @@ -317,23 +313,11 @@ curl -X POST "http://:8080/submit-job?restoreMode=SAVEPOINT&restoreSourc }' ``` -### 6.3 从指定 Savepoint 路径恢复 +### 6.3 关于从指定 Savepoint 恢复 -```bash -curl -X POST http://:8080/submit-job \ - -H "Content-Type: application/json" \ - -d '{ - "env": { - "job.name": "my-cdc-job-restored", - "job.mode": "STREAMING", - "checkpoint.interval": 30000, - "restore.mode": "savepoint", - "savepoint.path": "/seatunnel/checkpoint/savepoint/733584788375093248/1748595600000" - }, - "source": [ ... ], - "sink": [ ... ] - }' -``` +引擎不支持从任意 Savepoint 路径恢复。恢复时总是从 `restoreSourceJobId` 指定的源作业的 +最新 Savepoint(或 `restoreMode=CHECKPOINT` 时的最新完成 Checkpoint)恢复,用法见 6.1 与 6.2 节。 +源作业的旧状态数据如不再需要,可在 checkpoint storage 中手动清理。 --- diff --git a/docs/zh/engines/zeta/rest-api-v2.md b/docs/zh/engines/zeta/rest-api-v2.md index 1e88085dceeb..1371bfdf2a35 100644 --- a/docs/zh/engines/zeta/rest-api-v2.md +++ b/docs/zh/engines/zeta/rest-api-v2.md @@ -1450,8 +1450,8 @@ curl --location 'http://127.0.0.1:8080/submit-job/upload?restoreMode=CHECKPOINT& #### 例子 -获取当前节点的日志列表:`http://localhost:5801/log` -获取日志文件内容:`http://localhost:5801/log/job-898380162133917698.log`` +获取当前节点的日志列表:`http://localhost:8080/log` +获取日志文件内容:`http://localhost:8080/log/job-898380162133917698.log` diff --git a/docs/zh/engines/zeta/security.md b/docs/zh/engines/zeta/security.md index e0729e7a37d7..2fe5deef383c 100644 --- a/docs/zh/engines/zeta/security.md +++ b/docs/zh/engines/zeta/security.md @@ -32,7 +32,7 @@ seatunnel: | 参数名称 | 是否必填 | 参数描述 | |--------|---------|--------| -| `enable-http` | 否 | 是否开启 HTTP 服务,默认为 `true` | +| `enable-http` | 否 | 是否开启 HTTP 服务,默认为 `false` | | `port` | 否 | HTTP 服务端口,默认为 `8080` | | `enable-https` | 否 | 是否开启 HTTPS 服务,默认为 `false` | | `https-port` | 否 | HTTPS 服务端口,默认为 `8443` | diff --git a/docs/zh/engines/zeta/state-storage-and-recovery.md b/docs/zh/engines/zeta/state-storage-and-recovery.md index 5eba3601dd8b..ee15c459b5d9 100644 --- a/docs/zh/engines/zeta/state-storage-and-recovery.md +++ b/docs/zh/engines/zeta/state-storage-and-recovery.md @@ -12,10 +12,8 @@ SeaTunnel Engine(Zeta)在作业执行过程中会持久化多类状态数据 | 存储类别 | 用途 | 默认位置 | |---|---|---| | Checkpoint(检查点)| 流水线算子状态的容错快照 | `seatunnel.yaml` `checkpoint.storage` 配置路径 | -| Savepoint(保存点)| 用户手动触发的命名检查点,用于计划性停止或重启 | 与 Checkpoint 同路径,目录名不同 | -| IMap / MapStore | 分布式内存状态(作业元数据、运行中作业数据、指标)| `hazelcast.yaml` MapStore base-dir | -| WAL(预写日志)| IMap 持久化的耐久性日志 | 与 MapStore base-dir 相同 | -| 历史作业元数据 | 已完成 / 失败作业记录 | MapStore base-dir | +| Savepoint(保存点)| 用户手动触发的命名检查点,用于计划性停止或重启 | 与 Checkpoint 同一存储,位于所属作业自身的目录下 | +| IMap / MapStore | 分布式内存状态(作业元数据、作业状态、历史记录)| 默认仅存于内存;可通过 `hazelcast.yaml` 中的 Hazelcast MapStore 配置持久化 | --- @@ -48,10 +46,8 @@ seatunnel: checkpoint: interval: 10000 # 两次 Checkpoint 间隔(毫秒) timeout: 60000 # Checkpoint 完成超时(毫秒) - max-concurrent: 1 # 最大并发 Checkpoint 数 - tolerable-failure: 2 # 允许连续失败次数 storage: - type: hdfs # hdfs | localfile(已废弃) + type: hdfs # hdfs(通过 HDFS API 同时支持 S3、本地文件)| localfile(已废弃) plugin-config: namespace: /seatunnel/checkpoint/ # 必须以 / 结尾 # S3 示例: @@ -77,7 +73,7 @@ seatunnel: | 维度 | Checkpoint | Savepoint | |---|---|---| -| 触发方式 | 周期性 / 自动 | 手动(`seatunnel.sh -r --savepoint`)| +| 触发方式 | 周期性 / 自动 | 手动(`$SEATUNNEL_HOME/bin/seatunnel.sh --savepoint `)| | 用途 | 容错恢复 | 计划性停止、升级、迁移 | | 生命周期 | 引擎管理 | 操作人员管理 | | 保留策略 | 自动轮转 | 手动删除前永久保留 | @@ -86,7 +82,7 @@ seatunnel: ```bash # 停止运行中的作业并创建 Savepoint -$SEATUNNEL_HOME/bin/seatunnel.sh --stop-job --savepoint +$SEATUNNEL_HOME/bin/seatunnel.sh --savepoint # 或通过 REST API v2 curl -X POST http://:8080/stop-job \ @@ -115,14 +111,8 @@ $SEATUNNEL_HOME/bin/seatunnel.sh --config job.conf --restore-with-checkpoint / - savepoint/ - / - / - / - /state-data -``` +Savepoint 是保存点类型的 Checkpoint:它写入上文配置的同一个 Checkpoint 存储中,位于所属作业的目录下 +(`//`)。不存在独立的 savepoint 根目录。 ### 安全清理 @@ -134,43 +124,41 @@ $SEATUNNEL_HOME/bin/seatunnel.sh --config job.conf --restore-with-checkpoint / - maps/ - running-job-state/ - running-job-metrics/ - finished-job-state/ - finished-job-metrics/ -``` +在分离式集群模式下,只有 Master 节点存储 IMap 数据,因此该配置仅在 Master 节点生效。 ### IMap、MapStore 与 Checkpoint 的关系 @@ -180,38 +168,27 @@ IMap / MapStore <──────────────────── ``` 二者**完全独立**。删除 Checkpoint 存储不影响 IMap;反之亦然。 -作业可以从 Checkpoint 恢复,即使 IMap MapStore 已被清除——但作业 ID 和流水线映射需要**重新提交**, -因为 `running-job-state` 已丢失。 +作业可以从 Checkpoint 恢复,即使 IMap MapStore 数据已被清除——但作业 ID 和流水线映射需要**重新提交**, +因为运行作业的状态已丢失。 --- -## 4. WAL(预写日志) - -Hazelcast 使用 WAL 保证 MapStore 的耐久性。WAL 文件累积在: - -``` -/ - wal/ - -.wal -``` - -### 长期运行 CDC 作业的 WAL 增长 - -每次 CDC binlog 事件更新 `running-job-metrics` 或 `running-pipeline-state` 时,都会产生一次 WAL 写入。 -随着时间推移(数天或数周),如果出现以下情况,WAL 文件可能增长至数 GB: +## 4. MapStore 文件维护 -- `write-behind-delay-seconds` 设置过低(刷新频率过高) -- 作业每秒处理数百万事件 +IMap 持久化会把每个 map 以文件形式写入配置的 `namespace` 目录下。长期运行的集群中,只要作业持续运行、 +状态持续变化,这些文件就会不断增长。 **缓解措施:** -```yaml -hazelcast.fs.write-behind-delay-seconds: 5 # 增大刷新间隔 -hazelcast.fs.compaction-threshold: 1000 # N 条写入后触发压缩 +- 让已完成作业按期过期:`history-job-expire-minutes` 会将已完成作业的记录从 IMap 中移除, + 使其不再被持久化。 +- 在 Master 节点上监控 namespace 目录: + +```bash +du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace ``` -**已完成作业**的 WAL 文件在对应 IMap 条目已刷入 MapStore 文件后可以安全压缩或删除。 -**不要**删除运行中作业的 WAL 文件。 +**不要**删除运行中作业的 MapStore 文件。记录已从 IMap 中过期的已完成作业,可以在集群停止时删除其文件。 --- @@ -227,14 +204,11 @@ seatunnel: | 操作 | 是否受过期影响 | |---|---| -| 从 `finished-job-state` IMap 中移除 | 是 | -| 从 `finished-job-metrics` IMap 中移除 | 是 | -| 删除该作业的 MapStore 持久化文件 | 是(IMap 驱逐后) | +| 从已完成作业 IMap(`engine_finishedJobState`、`engine_finishedJobMetrics`)中移除记录 | 是 | | 删除 Checkpoint 存储目录 | **否** | -| 删除 Savepoint 目录 | **否** | -| 删除 WAL 文件 | **否**(仅通过压缩间接处理)| +| 删除 Savepoint 数据 | **否** | -**核心结论**:`history-job-expire-minutes` 仅清理 `finished-job-state` 中的作业元数据。 +**核心结论**:`history-job-expire-minutes` 仅清理已完成作业 IMap 中的作业元数据。 HDFS / S3 / 本地的 Checkpoint 和 Savepoint 目录**不受此配置影响**,必须独立管理。 --- @@ -261,25 +235,18 @@ HDFS / S3 / 本地的 Checkpoint 和 Savepoint 目录**不受此配置影响** 所需存储 = checkpoint_size × 3 × 安全系数(1.5) ``` -### IMap / WAL 容量估算 +### IMap 存储容量估算 每个运行中的 CDC 作业大约占用: -- `running-job-state`:每条流水线约 50–200 字节 -- `running-job-metrics`:每次指标刷新每条流水线约 1–2 KB - -对于运行 100 个 CDC 作业的集群: - -``` -imap 内存 ≈ 100 × 200B ≈ 20 KB(状态) -WAL 磁盘:建议每节点规划 2–5 GB -``` +- 作业状态:每条流水线约 50–200 字节 +- 指标:每次指标刷新每条流水线约 1–2 KB -使用以下命令持续监控: +对于运行 100 个 CDC 作业的集群,IMap 数据量在几 MB 量级。MapStore namespace 的磁盘占用随状态 +流转历史增长,长期运行的集群建议规划数 GB 空间,并使用以下命令持续监控: ```bash -du -sh $SEATUNNEL_HOME/imap/wal/ -watch -n 60 'du -sh /tmp/seatunnel/imap/' +du -sh /tmp/seatunnel/imap/ # 替换为你配置的 MapStore namespace ``` --- @@ -316,32 +283,25 @@ ls -lh /tmp/seatunnel/checkpoint/ --- -### IMap / WAL 目录增长 +### MapStore namespace 目录增长 -**现象**:`/tmp/seatunnel/imap/` 占满 Master / Worker 节点磁盘。 +**现象**:配置的 MapStore `namespace` 目录占满 Master 节点磁盘。 **诊断**: ```bash -du -sh /tmp/seatunnel/imap/wal/ -du -sh /tmp/seatunnel/imap/maps/ +du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace ``` **可能根因**: -- `running-job-metrics` 在每次 Checkpoint 时为每个运行中作业更新 -- `write-behind-delay-seconds` 过低(默认 1 秒) -- WAL 压缩触发频率不足 +- 已完成作业未过期(`history-job-expire-minutes` 未设置或过大) +- 运行中作业过多,状态和指标持续更新 **修复**: -```yaml -# hazelcast.yaml -hazelcast.fs.write-behind-delay-seconds: 10 -hazelcast.fs.compaction-threshold: 500 -``` - -重启引擎后,已完成作业的旧 WAL 文件将在启动时被压缩。 +在 `seatunnel.yaml` 中启用 / 调整 `history-job-expire-minutes`;如有需要,可在集群停止时清理 +已过期作业的文件。 --- @@ -364,12 +324,11 @@ hazelcast.fs.compaction-threshold: 500 删除任何状态目录前,请确认: -- [ ] 作业已处于 `FINISHED`、`CANCELLED` 或 `FAILED` 终态 +- [ ] 作业已处于 `FINISHED`、`CANCELED` 或 `FAILED` 终态 - [ ] 确认不会从该 Checkpoint 或 Savepoint 恢复 - [ ] 确认该作业 ID 未被任何监控或告警规则引用 - [ ] Checkpoint 存储:递归删除 `//` -- [ ] Savepoint:递归删除 `/savepoint//` -- [ ] MapStore / WAL:手动删除后重启引擎以触发重载 +- [ ] MapStore 数据:先停止集群,再删除已过期作业的文件 --- diff --git a/docs/zh/engines/zeta/tuning-guide.md b/docs/zh/engines/zeta/tuning-guide.md index 40505bcbbe67..55a89ede1ba9 100644 --- a/docs/zh/engines/zeta/tuning-guide.md +++ b/docs/zh/engines/zeta/tuning-guide.md @@ -20,7 +20,7 @@ SeaTunnel Engine 是基于 [JVM](https://zh.wikipedia.org/wiki/Java%E8%99%9A%E6% ##### 排查流程 1. 检查 JVM 堆内存实时占用 - 使用 `jcmd` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。 + 使用 `jmap` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。 ```bash jmap -heap ``` @@ -169,7 +169,7 @@ Hazelcast 的 `SlowOperationDetector` 监控分区线程上的操作执行时间 ```bash # 检查慢操作日志的频率和时间 -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-server.log | tail -50 +grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -50 ``` 将时间戳与以下事件关联: @@ -190,7 +190,7 @@ free -h **REST 提交延迟:** - 症状:通过 REST API 提交作业时出现慢操作,且提交客户端响应时间较长。 -- 检查:`grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-server.log` —— 关注耗时。 +- 检查:`grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log` —— 关注耗时。 - 常见原因:Master 节点并发提交过载,或作业配置非常庞大(连接器/Transform 数量多)。 - 缓解:限制并发提交速率、增加 Master 节点资源、或调整 `hazelcast.operation.generic.thread.count`。 @@ -208,7 +208,7 @@ free -h **Checkpoint 存储延迟:** - 症状:慢操作与 Checkpoint 间隔对齐,且 Checkpoint 耗时超过配置的超时。 -- 检查:为 `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator` 启用 DEBUG 日志,然后执行 `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-server.log | grep -oP 'cost: \d+ms'` 查看 Checkpoint 耗时。 +- 检查:为 `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator` 启用 DEBUG 日志,然后执行 `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | grep -oP 'cost: \d+ms'` 查看 Checkpoint 耗时。 - 如果使用 S3:运行 `aws s3api head-object --bucket --key ` 测量延迟,或查看 CloudWatch S3 指标(`FirstByteLatency`、`TotalRequestLatency`)。 - 常见原因:到 S3/HDFS 的网络延迟高、小文件导致多次往返、或 S3 限流。 - 缓解:参见[第 6 节](#6-s3-checkpoint状态存储延迟)。 @@ -307,7 +307,7 @@ SeaTunnel 定期输出健康监控日志(默认每 60 秒一次)。这些日 ```bash # 提取慢操作告警及其耗时 -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-server.log | tail -20 +grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -20 ``` #### 4.3 节点资源指标 diff --git a/docs/zh/getting-started/submit-job-to-remote-zeta-cluster.md b/docs/zh/getting-started/submit-job-to-remote-zeta-cluster.md index 3a3b3001ffaf..f18d3ef0e93d 100644 --- a/docs/zh/getting-started/submit-job-to-remote-zeta-cluster.md +++ b/docs/zh/getting-started/submit-job-to-remote-zeta-cluster.md @@ -24,16 +24,17 @@ Docker 单节点、多节点集群、Kubernetes(通过 `kubectl port-forward` ### 2.1 `--master` 参数(Zeta) -所有 SeaTunnel Zeta 客户端命令均支持 `--master` 参数,用于指定集群连接地址: +所有 SeaTunnel Zeta 客户端命令均支持 `--master`(或 `-m`)参数,用于指定作业在本地运行还是提交到集群。 +该参数只接受 `local` 或 `cluster`,不接受集群地址: ```bash bin/seatunnel.sh \ --config job.conf \ - --master seatunnel://192.168.1.100:5801 + -m cluster ``` -Zeta 集群内部默认端口为 **5801**,与 REST API 端口(8080)不同。`--master` 参数用于 -通过 Hazelcast 成员协议直接连接集群。 +客户端从 `config/hazelcast-client.yaml`(`cluster-name` 与 `cluster-members`)获取目标集群地址。 +Zeta 集群内部默认端口为 **5801**,与 REST API 端口(8080)不同。客户端通过 Hazelcast 协议与集群通信。 ### 2.2 使用 REST API(推荐用于自动化场景) @@ -336,7 +337,6 @@ helm upgrade seatunnel seatunnel/seatunnel \ |---|---|---|---| | **5801** | TCP | Hazelcast 集群 | 成员间通信;生产环境不要对外暴露 | | **8080** | TCP | REST API | 生产环境建议通过认证网关暴露 | -| **8090** | TCP | Web UI | 可选,仅用于管理看板 | 在 Kubernetes 中,建议设置 NetworkPolicy 将 5801 端口限制在 SeaTunnel 命名空间内: diff --git a/docs/zh/introduction/concepts/schema-feature.md b/docs/zh/introduction/concepts/schema-feature.md index 1f533bfef8b4..4e6838e73445 100644 --- a/docs/zh/introduction/concepts/schema-feature.md +++ b/docs/zh/introduction/concepts/schema-feature.md @@ -167,7 +167,7 @@ SeaTunnel 提供了一种简单直接的方式来声明基本类型。基本类 - 声明decimal类型时,需要设置精度(precision)和小数位数(scale),类型定义遵循“decimal(precision, scale)”格式。 需要强调的是,十进制类型的声明必须用 `"` 括起来;不能像基本类型一样直接使用类型名称。例如,当声明精度为 10、小数位数为 2 的十进制字段时,您可以指定字段类型为`"decimal(10,2)"`。 - 声明array类型时,需要指定元素类型,类型定义遵循 `array` 格式,其中 `T` 代表元素类型。元素类型包括`int`,`string`,`boolean`,`tinyint`,`smallint`,`bigint`,`float` 和 `double`。与十进制类型声明类似,它也用 `"` 括起来。例如,在声明具有整数数组的字段时,将字段类型指定为 `"array"`。 - 声明map类型时,需要指定键和值类型。map类型定义遵循`map`格式,其中`K`表示键类型,`V`表示值类型。 `K`可以是任何基本类型和十进制类型,`V`可以是 SeaTunnel 支持的任何类型。 与之前的类型声明类似,map类型声明必须用双引号引起来。 例如,当声明一个map类型的字段时,键类型为字符串,值类型为整数,则可以将该字段声明为`"map"`。 -- 声明row类型时,需要定义一个 [HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) 对象来描述字段及其类型。 字段类型可以是 SeaTunnel 支持的任何类型。 例如,当声明包含整数字段“a”和字符串字段“b”的行类型时,可以将其声明为“{a = int, b = string}”。 将定义作为字符串括在 `"` 中也是可以接受的,因此 `"{a = int, b = string}"` 相当于 `{a = int, c = string}`。由于 HOCON 与 JSON 兼容, `"{\"a\":\"int\", \"b\":\"string\"}"` 等价于 `"{a = int, b = string}"`。 +- 声明row类型时,需要定义一个 [HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) 对象来描述字段及其类型。 字段类型可以是 SeaTunnel 支持的任何类型。 例如,当声明包含整数字段“a”和字符串字段“b”的行类型时,可以将其声明为“{a = int, b = string}”。 将定义作为字符串括在 `"` 中也是可以接受的,因此 `"{a = int, b = string}"` 相当于 `{a = int, b = string}`。由于 HOCON 与 JSON 兼容, `"{\"a\":\"int\", \"b\":\"string\"}"` 等价于 `"{a = int, b = string}"`。 以下是复杂类型声明的示例: @@ -205,7 +205,7 @@ primaryKey { | 字段 | 是否必须 | 默认值 | 描述 | |:--------|:-----|:----|---------| | name | 是 | - | 主键名称 | -| columns | 是 | - | 主键中的列列表 | +| columnNames | 是 | - | 主键中的列列表 | ### 约束键(constraintKeys) From e1ff7a3c3765b95c40678fb04cbaf6a072011868 Mon Sep 17 00:00:00 2001 From: jast Date: Thu, 22 Oct 2026 10:09:44 +0800 Subject: [PATCH 2/5] [Docs] Address review: Prometheus retry default, DuckDB unsigned rows and storage cleanup guidance - Restore the Prometheus sink retry default of 3 in en/zh (the sink applies orElse(3)); 0 disables retries. - Revert the four DuckDB unsigned-integer mapping rows to the current dev wording to avoid conflicting with #12508, which widens the converter. - Drop the duplicated DSQL dialect cell from the JDBC sink dialect table. - Describe the IMap MapStore as an append-only write-ahead log and replace the per-job file deletion advice with volume sizing plus a full-namespace wipe, since all jobs share the same region files. - Align the zh Snowflake geospatial sentence with the en page. - Document the Snowflake sink scale reduction for p > 38 and drop the inaccurate source row. - Remove the removed max-concurrent factor from the capacity formula. --- docs/en/connectors/sink/Jdbc.md | 2 +- docs/en/connectors/sink/Prometheus.md | 2 +- docs/en/connectors/sink/Snowflake.md | 2 +- docs/en/connectors/source/DuckDB.md | 10 ++++----- docs/en/connectors/source/Snowflake.md | 1 - .../zeta/state-storage-and-recovery.md | 22 +++++++++++-------- docs/zh/connectors/sink/Jdbc.md | 2 +- docs/zh/connectors/sink/Prometheus.md | 2 +- docs/zh/connectors/sink/Snowflake.md | 2 +- docs/zh/connectors/source/DuckDB.md | 10 ++++----- docs/zh/connectors/source/Snowflake.md | 3 +-- .../zeta/state-storage-and-recovery.md | 17 ++++++++------ 12 files changed, 38 insertions(+), 37 deletions(-) diff --git a/docs/en/connectors/sink/Jdbc.md b/docs/en/connectors/sink/Jdbc.md index 3204193df6dd..c152838a43de 100644 --- a/docs/en/connectors/sink/Jdbc.md +++ b/docs/en/connectors/sink/Jdbc.md @@ -258,7 +258,7 @@ If one dialect not supported by SeaTunnel, it will use the default dialect `Gene | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | | OpenGauss | Presto | Dsql | -| DuckDB | DSQL | YashanDB | +| DuckDB | YashanDB | | ### database [string] The target database or catalog used in generated SQL mode. This option is required when `generate_sink_sql = true` and must not be combined with `query`. diff --git a/docs/en/connectors/sink/Prometheus.md b/docs/en/connectors/sink/Prometheus.md index 911f9a5a69df..13a119d26c7a 100644 --- a/docs/en/connectors/sink/Prometheus.md +++ b/docs/en/connectors/sink/Prometheus.md @@ -50,7 +50,7 @@ downloaded from Maven Central. | key_value | String | Yes | - | Name of the upstream field that contains the Prometheus sample value. A `double` field is recommended. | | key_timestamp | String | No | - | Name of the upstream field that contains the Prometheus sample timestamp. If omitted, the sink uses the current system time. | | headers | Map | No | - | HTTP request headers. | -| retry | Int | No | - | Maximum retry attempts for a failed remote-write request. Not set by default: the request is attempted once with no retries. Retries transport `IOException`s and retryable HTTP statuses (`5xx` and `429`); other `4xx` responses fail fast. Set to `0` to disable retries explicitly. | +| retry | Int | No | 3 | Maximum retry attempts for a failed remote-write request. When unset, defaults to 3 retries. Retries transport `IOException`s and retryable HTTP statuses (`5xx` and `429`); other `4xx` responses fail fast. Set to `0` to disable retries. | | retry_backoff_multiplier_ms | Int | No | 100 | Retry backoff multiplier in milliseconds. | | retry_backoff_max_ms | Int | No | 10000 | Maximum retry backoff in milliseconds. | | batch_size | Int | No | 1024 | Positive number of rows buffered before writing to Prometheus. | diff --git a/docs/en/connectors/sink/Snowflake.md b/docs/en/connectors/sink/Snowflake.md index 3ab84d20fe98..a98c45055a7f 100644 --- a/docs/en/connectors/sink/Snowflake.md +++ b/docs/en/connectors/sink/Snowflake.md @@ -43,7 +43,7 @@ Write data to Snowflake through JDBC. The sink supports batch and streaming jobs | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, s) | +| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, s - (p - 38)) (minimum scale 0) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | diff --git a/docs/en/connectors/source/DuckDB.md b/docs/en/connectors/source/DuckDB.md index 4b22d1074c44..ad6f1187fe87 100644 --- a/docs/en/connectors/source/DuckDB.md +++ b/docs/en/connectors/source/DuckDB.md @@ -58,12 +58,10 @@ MySQL automatic DDL cannot create a full-column primary key on `LONGTEXT`. If a |---------------------------------------------------------------------|---------------------| | BOOLEAN | BOOLEAN | | TINYINT | TINYINT | -| UTINYINT | TINYINT | -| SMALLINT | SMALLINT | -| USMALLINT | SMALLINT | -| INTEGER | INT | -| UINTEGER | INT | -| BIGINT
UBIGINT | BIGINT | +| UTINYINT
SMALLINT | SMALLINT | +| USMALLINT
INTEGER | INT | +| UINTEGER
BIGINT | BIGINT | +| UBIGINT | DECIMAL(20,0) | | HUGEINT | DECIMAL(38,0) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | diff --git a/docs/en/connectors/source/Snowflake.md b/docs/en/connectors/source/Snowflake.md index 4bf8d646af07..073573812689 100644 --- a/docs/en/connectors/source/Snowflake.md +++ b/docs/en/connectors/source/Snowflake.md @@ -45,7 +45,6 @@ Read data from Snowflake through JDBC. SeaTunnel uses the official Snowflake JDB | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s) (with `p > 38`) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | diff --git a/docs/en/engines/zeta/state-storage-and-recovery.md b/docs/en/engines/zeta/state-storage-and-recovery.md index fc22a310ca9c..3f2a67cd103b 100644 --- a/docs/en/engines/zeta/state-storage-and-recovery.md +++ b/docs/en/engines/zeta/state-storage-and-recovery.md @@ -187,9 +187,10 @@ and pipeline mapping must be re-submitted** because the running job state is los ## 4. MapStore File Maintenance -The IMap persistence writes each map as files under the configured `namespace`. In long-running -clusters these files keep growing while jobs keep running, because every state change of a running -job is written through the MapStore. +The IMap persistence is an append-only write-ahead log: `FileMapStore` delegates to `IMapFileStorage`, +which appends every state change through the WAL writer into region files under the configured +`namespace`. Entries of all jobs are appended into the same region files, so the files keep growing +while jobs keep running. **Mitigation:** @@ -201,8 +202,10 @@ job is written through the MapStore. du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml ``` -Do not delete MapStore files of running jobs. Files of finished jobs whose records have already -expired from the IMaps can be removed while the cluster is stopped. +Do not delete MapStore files selectively: there are no job-scoped files to pick out, and removing +files by hand can corrupt IMap replay on the next master start. Size the namespace volume instead, +and wipe the whole namespace only while the cluster is stopped and when losing all running-job +IMap state is acceptable. --- @@ -240,7 +243,7 @@ touched by this setting. You must manage them separately. | PostgreSQL CDC (logical replication) | 1–50 KB per table | | Oracle CDC (LogMiner) | 50 KB – 2 MB | -Formula: `checkpoint_size ≈ N_tables × avg_splits × state_per_split × max_concurrent_checkpoints` +Formula: `checkpoint_size ≈ N_tables × avg_splits × state_per_split` (only one checkpoint is in flight at a time, so no concurrency factor applies) ### Storage sizing rule of thumb @@ -317,8 +320,9 @@ du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in haz **Fix**: -Enable/tune `history-job-expire-minutes` in `seatunnel.yaml`, and clean up files of expired jobs -while the cluster is stopped if needed. +Enable/tune `history-job-expire-minutes` in `seatunnel.yaml`. MapStore region files cannot be +trimmed per job; reclaiming their space requires stopping the cluster and wiping the whole +namespace, which discards the IMap state of all jobs. --- @@ -346,7 +350,7 @@ Before deleting any state directory: - [ ] Confirm you will not restore from checkpoint or savepoint - [ ] Confirm the job ID is not referenced in any monitoring or alerting rule - [ ] For checkpoint storage: delete `//` recursively -- [ ] For MapStore data: stop the cluster before deleting files of expired jobs +- [ ] For MapStore data: only a full namespace wipe (cluster stopped) is safe; selective per-job deletion is not supported --- diff --git a/docs/zh/connectors/sink/Jdbc.md b/docs/zh/connectors/sink/Jdbc.md index 5b3ed1221be9..e25210d188f7 100644 --- a/docs/zh/connectors/sink/Jdbc.md +++ b/docs/zh/connectors/sink/Jdbc.md @@ -257,7 +257,7 @@ Postgres 9.5及以下版本,请设置为 `postgresLow` 来支持 CDC | Vertica | OceanBase | XUGU | | IRIS | Inceptor | Highgo | | OpenGauss | Presto | Dsql | -| DuckDB | DSQL | YashanDB | +| DuckDB | YashanDB | | ### database [string] diff --git a/docs/zh/connectors/sink/Prometheus.md b/docs/zh/connectors/sink/Prometheus.md index 4bb402a5c353..917061b3e702 100644 --- a/docs/zh/connectors/sink/Prometheus.md +++ b/docs/zh/connectors/sink/Prometheus.md @@ -47,7 +47,7 @@ Prometheus 数据接收器把上游数据写入 Prometheus remote write API。 | key_value | String | 是 | - | 上游数据中保存 Prometheus 指标值的字段名。推荐使用 `double` 类型字段。 | | key_timestamp | String | 否 | - | 上游数据中保存 Prometheus 指标时间戳的字段名。不配置时使用当前系统时间。 | | headers | Map | 否 | - | HTTP 请求头。 | -| retry | Int | 否 | - | remote-write 请求失败时的最大重试次数。默认未设置:请求只尝试一次,不进行重试。重试会覆盖传输层 `IOException` 以及可重试的 HTTP 状态码(`5xx` 和 `429`);其他 `4xx` 响应会快速失败。设为 `0` 可显式禁用重试。 | +| retry | Int | 否 | 3 | remote-write 请求失败时的最大重试次数。未设置时默认重试 3 次。重试会覆盖传输层 `IOException` 以及可重试的 HTTP 状态码(`5xx` 和 `429`);其他 `4xx` 响应会快速失败。设为 `0` 可禁用重试。 | | retry_backoff_multiplier_ms | Int | 否 | 100 | 重试退避时间倍数,单位毫秒。 | | retry_backoff_max_ms | Int | 否 | 10000 | 最大重试退避时间,单位毫秒。 | | batch_size | Int | 否 | 1024 | 写入 Prometheus 前缓存的行数,必须大于 0。 | diff --git a/docs/zh/connectors/sink/Snowflake.md b/docs/zh/connectors/sink/Snowflake.md index eb295f7dfeb4..4fe53c28957d 100644 --- a/docs/zh/connectors/sink/Snowflake.md +++ b/docs/zh/connectors/sink/Snowflake.md @@ -43,7 +43,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, s) | +| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, s - (p - 38))(最小为 0) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | diff --git a/docs/zh/connectors/source/DuckDB.md b/docs/zh/connectors/source/DuckDB.md index 24e2293d4cfd..3718cf875b1f 100644 --- a/docs/zh/connectors/source/DuckDB.md +++ b/docs/zh/connectors/source/DuckDB.md @@ -55,12 +55,10 @@ MySQL 自动建表无法在 `LONGTEXT` 上创建使用完整列值的主键。 |----------------------------------------------------------|----------------| | BOOLEAN | BOOLEAN | | TINYINT | TINYINT | -| UTINYINT | TINYINT | -| SMALLINT | SMALLINT | -| USMALLINT | SMALLINT | -| INTEGER | INT | -| UINTEGER | INT | -| BIGINT
UBIGINT | BIGINT | +| UTINYINT
SMALLINT | SMALLINT | +| USMALLINT
INTEGER | INT | +| UINTEGER
BIGINT | BIGINT | +| UBIGINT | DECIMAL(20,0) | | HUGEINT | DECIMAL(38,0) | | FLOAT | FLOAT | | DOUBLE | DOUBLE | diff --git a/docs/zh/connectors/source/Snowflake.md b/docs/zh/connectors/source/Snowflake.md index 214b54623659..00492f12b0e6 100644 --- a/docs/zh/connectors/source/Snowflake.md +++ b/docs/zh/connectors/source/Snowflake.md @@ -45,7 +45,6 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | INT
INTEGER | INT | | BIGINT | LONG | | DECIMAL
NUMERIC
NUMBER
| DECIMAL(p, s) | -| DECIMAL(p, s)(p > 38 时) | DECIMAL(38, s) | | REAL
FLOAT4 | FLOAT | | DOUBLE
DOUBLE PRECISION
FLOAT8
FLOAT | DOUBLE | | CHAR
CHARACTER
VARCHAR
STRING
TEXT
VARIANT
OBJECT | STRING | @@ -151,7 +150,7 @@ source { - Snowflake 任务使用 `Jdbc` 插件名,并设置 `driver = "net.snowflake.client.jdbc.SnowflakeDriver"`。 - 运行任务前请把 Snowflake JDBC 驱动 jar 放到 `$SEATUNNEL_HOME/plugins/jdbc/lib/`。 - 并行读取时,`partition_column`、`partition_lower_bound`、`partition_upper_bound` 和 `partition_num` 必须描述同一数值列的范围。 -- Snowflake 地理空间列的字节/字符串返回形式由 Snowflake JDBC URL 参数(如 `GEOGRAPHY_OUTPUT_FORMAT`)决定。 +- Snowflake 地理空间列映射为 SeaTunnel `STRING` 类型。 ## 变更日志 diff --git a/docs/zh/engines/zeta/state-storage-and-recovery.md b/docs/zh/engines/zeta/state-storage-and-recovery.md index ee15c459b5d9..942319727ff4 100644 --- a/docs/zh/engines/zeta/state-storage-and-recovery.md +++ b/docs/zh/engines/zeta/state-storage-and-recovery.md @@ -175,8 +175,9 @@ IMap / MapStore <──────────────────── ## 4. MapStore 文件维护 -IMap 持久化会把每个 map 以文件形式写入配置的 `namespace` 目录下。长期运行的集群中,只要作业持续运行、 -状态持续变化,这些文件就会不断增长。 +IMap 持久化是一种追加写(append-only)的预写日志:`FileMapStore` 委托 `IMapFileStorage`,通过 WAL +写入器把每次状态变更追加到配置的 `namespace` 目录下的 region 文件中。所有作业的记录都追加到同一批 +region 文件里,因此只要作业持续运行,这些文件就会不断增长。 **缓解措施:** @@ -188,7 +189,9 @@ IMap 持久化会把每个 map 以文件形式写入配置的 `namespace` 目录 du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace ``` -**不要**删除运行中作业的 MapStore 文件。记录已从 IMap 中过期的已完成作业,可以在集群停止时删除其文件。 +**不要**按作业选择性地删除 MapStore 文件:并不存在按作业划分的文件,手工删除文件可能损坏下次 +Master 启动时的 IMap 重放。正确做法是为 namespace 卷规划足够的容量;只有当集群停止、且可以接受 +丢失所有运行中作业的 IMap 状态时,才整体清空 namespace。 --- @@ -225,7 +228,7 @@ HDFS / S3 / 本地的 Checkpoint 和 Savepoint 目录**不受此配置影响** | PostgreSQL CDC(逻辑复制)| 每张表 1–50 KB | | Oracle CDC(LogMiner)| 50 KB – 2 MB | -公式:`checkpoint_size ≈ 表数量 × 平均 Split 数 × 每 Split 状态大小 × 最大并发 Checkpoint 数` +公式:`checkpoint_size ≈ 表数量 × 平均 Split 数 × 每 Split 状态大小`(同一时刻只有一个 Checkpoint 在途,因此无需乘并发系数) ### 存储容量经验值 @@ -300,8 +303,8 @@ du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 name **修复**: -在 `seatunnel.yaml` 中启用 / 调整 `history-job-expire-minutes`;如有需要,可在集群停止时清理 -已过期作业的文件。 +在 `seatunnel.yaml` 中启用 / 调整 `history-job-expire-minutes`。MapStore 的 region 文件无法按作业 +裁剪;要回收其空间需要停止集群并整体清空 namespace,这会丢弃所有作业的 IMap 状态。 --- @@ -328,7 +331,7 @@ du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 name - [ ] 确认不会从该 Checkpoint 或 Savepoint 恢复 - [ ] 确认该作业 ID 未被任何监控或告警规则引用 - [ ] Checkpoint 存储:递归删除 `//` -- [ ] MapStore 数据:先停止集群,再删除已过期作业的文件 +- [ ] MapStore 数据:仅支持整体清空 namespace(先停止集群),不支持按作业选择性删除 --- From e080aebdd2ba59a7312c63b12c2dda539fe57c3f Mon Sep 17 00:00:00 2001 From: jast Date: Tue, 3 Nov 2026 09:44:27 +0800 Subject: [PATCH 3/5] [Docs] Address review findings on tuning, SLS and state-storage pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tuning-guide.md (EN/ZH): use jcmd GC.heap_info as the first heap check (jmap -heap is removed on JDK 9+) and label the sample output as a JDK 8 reference; jmap -dump/-histo remain valid. - Sls.md (EN/ZH): drop the log_group_size row — the option is not registered by SlsSinkFactory.optionRule() so the config validator rejects it; the factory change belongs in a separate code PR. - state-storage-and-recovery.md (EN/ZH): scope the du command to local file storage and add a backend-aware example for HDFS/object stores; describe engine_runningJobInfo as submitted job info and initialization metadata (metrics live in engine_finishedJobMetrics). - rest-api-job-lifecycle.md (ZH): align the 6.3 heading with the EN one. --- docs/en/connectors/sink/Sls.md | 1 - docs/en/engines/zeta/state-storage-and-recovery.md | 8 +++++--- docs/en/engines/zeta/tuning-guide.md | 6 +++--- docs/zh/connectors/sink/Sls.md | 1 - docs/zh/engines/zeta/rest-api-job-lifecycle.md | 2 +- docs/zh/engines/zeta/state-storage-and-recovery.md | 11 +++++++---- docs/zh/engines/zeta/tuning-guide.md | 6 +++--- 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/en/connectors/sink/Sls.md b/docs/en/connectors/sink/Sls.md index 0cc3b3178d19..77bc18be18cf 100644 --- a/docs/en/connectors/sink/Sls.md +++ b/docs/en/connectors/sink/Sls.md @@ -41,7 +41,6 @@ Maven central repository. | access_key_secret | String | Yes | - | Alibaba Cloud AccessKey secret. Must not be empty or whitespace-only. | | source | String | No | `SeaTunnel-Source` | Source tag written to SLS log groups. | | topic | String | No | `SeaTunnel-Topic` | Topic tag written to SLS log groups. | -| log_group_size | Int | No | 100 | Size of the SLS log group used when batching logs for write. | ## Notes diff --git a/docs/en/engines/zeta/state-storage-and-recovery.md b/docs/en/engines/zeta/state-storage-and-recovery.md index 105cff7afb75..bd7eb40d5b7d 100644 --- a/docs/en/engines/zeta/state-storage-and-recovery.md +++ b/docs/en/engines/zeta/state-storage-and-recovery.md @@ -139,7 +139,7 @@ logical maps used by the engine are: | IMap Name | Content | |---|---| -| `engine_runningJobInfo` | Submitted running job information (job id, job name, metrics snapshot) | +| `engine_runningJobInfo` | Submitted job information and initialization metadata (job id, job name, etc.; metrics live in `engine_finishedJobMetrics` after completion) | | `engine_runningJobState` | Current state machine status of running jobs and pipelines | | `engine_stateTimestamps` | Timestamps of job/pipeline state transitions | | `engine_finishedJobState` | Terminal state for completed, canceled, or failed jobs | @@ -201,7 +201,8 @@ while jobs keep running. - Monitor the namespace directory on the master node: ```bash -du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml +du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml (local file storage, i.e. fs.defaultFS starts with file:///) +hadoop fs -du -s -h / # for HDFS or object-store backed MapStore ``` Do not delete MapStore files selectively: there are no job-scoped files to pick out, and removing @@ -315,7 +316,8 @@ state is rotated out. **Diagnosis**: ```bash -du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml +du -sh /tmp/seatunnel/imap/ # replace with the namespace you configured in hazelcast.yaml (local file storage, i.e. fs.defaultFS starts with file:///) +hadoop fs -du -s -h / # for HDFS or object-store backed MapStore ``` **Root cause candidates**: diff --git a/docs/en/engines/zeta/tuning-guide.md b/docs/en/engines/zeta/tuning-guide.md index dca164a0833c..208bdf7e0752 100644 --- a/docs/en/engines/zeta/tuning-guide.md +++ b/docs/en/engines/zeta/tuning-guide.md @@ -20,11 +20,11 @@ If the SeaTunnel Engine cluster responds slowly or hangs, it may be due to insuf ##### Troubleshooting Process 1. Check JVM heap memory usage in real time - Use the `jmap` command to check JVM heap memory usage, where `` is the PID of the SeaTunnel Engine process. + Use the `jcmd` command to check JVM heap memory usage, where `` is the PID of the SeaTunnel Engine process. `jcmd GC.heap_info` works on JDK 8 and later (`jmap -heap` was removed in JDK 9+). ```bash - jmap -heap + jcmd GC.heap_info ``` - Example output: + Example output from a JDK 8 host (`jmap -heap` style, shown for reference): ```shell Attaching to process ID 2111950, please wait... Debugger attached successfully. diff --git a/docs/zh/connectors/sink/Sls.md b/docs/zh/connectors/sink/Sls.md index a170bae064d5..3985bf21d035 100644 --- a/docs/zh/connectors/sink/Sls.md +++ b/docs/zh/connectors/sink/Sls.md @@ -40,7 +40,6 @@ JSON,然后作为 SLS 日志项写入,日志内容的 key 为 `content`。 | access_key_secret | String | 是 | - | 阿里云 AccessKey Secret。值不能为空或仅包含空白字符。 | | source | String | 否 | `SeaTunnel-Source` | 写入 SLS log group 的 source 标记。 | | topic | String | 否 | `SeaTunnel-Topic` | 写入 SLS log group 的 topic 标记。 | -| log_group_size | Int | 否 | 100 | 写入时批量聚合日志使用的 SLS log group 大小。 | ## 注意事项 diff --git a/docs/zh/engines/zeta/rest-api-job-lifecycle.md b/docs/zh/engines/zeta/rest-api-job-lifecycle.md index 5713151324e2..4a9ae38afede 100644 --- a/docs/zh/engines/zeta/rest-api-job-lifecycle.md +++ b/docs/zh/engines/zeta/rest-api-job-lifecycle.md @@ -318,7 +318,7 @@ curl -X POST "http://:8080/submit-job?restoreMode=SAVEPOINT&restoreSourc }' ``` -### 6.3 关于从指定 Savepoint 恢复 +### 6.3 从显式 Savepoint 路径恢复 REST API 不支持指定具体的 Savepoint 路径进行恢复。不存在 `restore.mode` 或 `savepoint.path` 之类的 env 选项;恢复行为只由请求参数 `restoreMode` 和 `restoreSourceJobId` 控制,并且 diff --git a/docs/zh/engines/zeta/state-storage-and-recovery.md b/docs/zh/engines/zeta/state-storage-and-recovery.md index d6f74f120565..3a1b079a66da 100644 --- a/docs/zh/engines/zeta/state-storage-and-recovery.md +++ b/docs/zh/engines/zeta/state-storage-and-recovery.md @@ -130,7 +130,7 @@ SeaTunnel Engine 使用 Hazelcast IMap 作为分布式内存键值存储。引 | IMap 名称 | 内容 | |---|---| -| `engine_runningJobInfo` | 已提交运行作业的信息(作业 ID、作业名称、指标快照)| +| `engine_runningJobInfo` | 已提交作业的信息与初始化元数据(作业 ID、作业名称等;指标在作业完成后存于 `engine_finishedJobMetrics`)| | `engine_runningJobState` | 运行中作业和流水线的状态机当前状态 | | `engine_stateTimestamps` | 作业 / 流水线状态流转的时间戳 | | `engine_finishedJobState` | 已完成、已取消或失败作业的终态 | @@ -188,7 +188,8 @@ region 文件里,因此只要作业持续运行,这些文件就会不断增 - 在 Master 节点上监控 namespace 目录: ```bash -du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace +du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace(本地文件存储,即 fs.defaultFS 以 file:/// 开头时) +hadoop fs -du -s -h / # HDFS 或对象存储后端使用该命令查看 ``` **不要**按作业选择性地删除 MapStore 文件:并不存在按作业划分的文件,手工删除文件可能损坏下次 @@ -254,7 +255,8 @@ HDFS / S3 / 本地的 Checkpoint 和 Savepoint 目录**不受此配置影响** 流转历史增长,长期运行的集群建议规划数 GB 空间,并使用以下命令持续监控: ```bash -du -sh /tmp/seatunnel/imap/ # 替换为你配置的 MapStore namespace +du -sh /tmp/seatunnel/imap/ # 替换为你配置的 MapStore namespace(本地文件存储场景) +hadoop fs -du -s -h / # HDFS 或对象存储后端使用该命令查看 ``` --- @@ -298,7 +300,8 @@ ls -lh /tmp/seatunnel/checkpoint/ **诊断**: ```bash -du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace +du -sh /tmp/seatunnel/imap/ # 替换为你在 hazelcast.yaml 中配置的 namespace(本地文件存储,即 fs.defaultFS 以 file:/// 开头时) +hadoop fs -du -s -h / # HDFS 或对象存储后端使用该命令查看 ``` **可能根因**: diff --git a/docs/zh/engines/zeta/tuning-guide.md b/docs/zh/engines/zeta/tuning-guide.md index 4d48bcd86905..899a61fc4ad8 100644 --- a/docs/zh/engines/zeta/tuning-guide.md +++ b/docs/zh/engines/zeta/tuning-guide.md @@ -20,11 +20,11 @@ SeaTunnel Engine 是基于 [JVM](https://zh.wikipedia.org/wiki/Java%E8%99%9A%E6% ##### 排查流程 1. 检查 JVM 堆内存实时占用 - 使用 `jmap` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。 + 使用 `jcmd` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。`jcmd GC.heap_info` 在 JDK 8 及以上均可用(`jmap -heap` 在 JDK 9+ 已移除)。 ```bash - jmap -heap + jcmd GC.heap_info ``` - 输出结果示例: + 输出结果示例(JDK 8 主机上 `jmap -heap` 风格的输出,仅供参考): ```shell Attaching to process ID 2111950, please wait... Debugger attached successfully. From 3290e4c96bca32f15fd5c32faa5670f5c62c0be6 Mon Sep 17 00:00:00 2001 From: jast Date: Tue, 3 Nov 2026 10:51:11 +0800 Subject: [PATCH 4/5] [Docs] Split heap check by JDK version and fix role-aware log file names - tuning-guide.md (EN/ZH): GC.heap_info exists from JDK 9 only, so the heap check now offers jcmd for JDK 9+ and jmap -heap for JDK 8; the log paths use the seatunnel-engine-*.log glob with the role mapping noted (hybrid = -server.log, separated = -master/-worker). - hybrid-cluster-deployment.md (EN/ZH): restore seatunnel-engine-server.log for the default hybrid deployment. - log-analysis-with-ai.md (EN/ZH): job-log grep switched to the glob. - state-storage-and-recovery.md (EN): mirror the zh backend-aware sizing example in the IMap storage sizing block. - checkpoint-storage.md (ZH): // is not a YAML comment; use # as the en page does. --- .../engines/zeta/hybrid-cluster-deployment.md | 2 +- docs/en/engines/zeta/log-analysis-with-ai.md | 2 +- .../engines/zeta/state-storage-and-recovery.md | 3 ++- docs/en/engines/zeta/tuning-guide.md | 18 +++++++++++------- docs/zh/engines/zeta/checkpoint-storage.md | 2 +- .../engines/zeta/hybrid-cluster-deployment.md | 2 +- docs/zh/engines/zeta/log-analysis-with-ai.md | 2 +- docs/zh/engines/zeta/tuning-guide.md | 16 ++++++++++------ 8 files changed, 28 insertions(+), 19 deletions(-) diff --git a/docs/en/engines/zeta/hybrid-cluster-deployment.md b/docs/en/engines/zeta/hybrid-cluster-deployment.md index 01e732365766..87a3deb7c3d0 100644 --- a/docs/en/engines/zeta/hybrid-cluster-deployment.md +++ b/docs/en/engines/zeta/hybrid-cluster-deployment.md @@ -494,7 +494,7 @@ mkdir -p $SEATUNNEL_HOME/logs ./bin/seatunnel-cluster.sh -d ``` -The logs will be written to `$SEATUNNEL_HOME/logs/` (for example `seatunnel-engine-master.log` and `seatunnel-engine-worker.log`) +The logs will be written to `$SEATUNNEL_HOME/logs/` — for the default master-and-worker deployment this is `seatunnel-engine-server.log` ## 8. Submit And Manage Jobs diff --git a/docs/en/engines/zeta/log-analysis-with-ai.md b/docs/en/engines/zeta/log-analysis-with-ai.md index 2514d72e89b0..2b4b50226553 100644 --- a/docs/en/engines/zeta/log-analysis-with-ai.md +++ b/docs/en/engines/zeta/log-analysis-with-ai.md @@ -55,7 +55,7 @@ When logs are mixed, use the `ST-JID` value to select one job. For example: ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-master.log" \ +grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log # seatunnel-engine-server.log (hybrid) / -master.log / -worker.log (separated) \ "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log ``` diff --git a/docs/en/engines/zeta/state-storage-and-recovery.md b/docs/en/engines/zeta/state-storage-and-recovery.md index bd7eb40d5b7d..b29048b9c710 100644 --- a/docs/en/engines/zeta/state-storage-and-recovery.md +++ b/docs/en/engines/zeta/state-storage-and-recovery.md @@ -271,7 +271,8 @@ namespace disk usage grows with the state transition history; plan a few GB per cluster and monitor it with: ```bash -du -sh /tmp/seatunnel/imap/ # your configured MapStore namespace +du -sh /tmp/seatunnel/imap/ # local file storage (fs.defaultFS starts with file:///) +hadoop fs -du -s -h / # for HDFS or object-store backed MapStore ``` --- diff --git a/docs/en/engines/zeta/tuning-guide.md b/docs/en/engines/zeta/tuning-guide.md index 208bdf7e0752..ef96aab52aac 100644 --- a/docs/en/engines/zeta/tuning-guide.md +++ b/docs/en/engines/zeta/tuning-guide.md @@ -20,11 +20,14 @@ If the SeaTunnel Engine cluster responds slowly or hangs, it may be due to insuf ##### Troubleshooting Process 1. Check JVM heap memory usage in real time - Use the `jcmd` command to check JVM heap memory usage, where `` is the PID of the SeaTunnel Engine process. `jcmd GC.heap_info` works on JDK 8 and later (`jmap -heap` was removed in JDK 9+). + Use the `jcmd` command, where `` is the PID of the SeaTunnel Engine process. On JDK 9+ use `jcmd GC.heap_info`; on JDK 8 use `jmap -heap ` (removed in JDK 9+). ```bash + # JDK 9+ jcmd GC.heap_info + # JDK 8 + jmap -heap ``` - Example output from a JDK 8 host (`jmap -heap` style, shown for reference): + Example output from a JDK 8 host (`jmap -heap` style): ```shell Attaching to process ID 2111950, please wait... Debugger attached successfully. @@ -169,7 +172,8 @@ Use the following decision tree to narrow down the root cause of slow operations ```bash # Check the slow operation log frequency and timing -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -50 +grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tail -50 +# seatunnel-engine-server.log on the default hybrid deployment; -master.log / -worker.log when roles are separated ``` Correlate the timestamps with: @@ -190,7 +194,7 @@ free -h **REST submission latency:** - Symptom: Slow operations appear when jobs are submitted via REST API, and the submitting client experiences long response times. -- Check: `grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log` — look for elapsed time. +- Check: `grep "submitJob" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log` — look for elapsed time. - Common cause: Master node is overloaded with concurrent submissions, or the job configuration is very large (many connectors/transforms). - Mitigation: Rate-limit concurrent submissions, increase master node resources, or use `hazelcast.operation.generic.thread.count` tuning. @@ -208,7 +212,7 @@ free -h **Checkpoint storage latency:** - Symptom: Slow operations align with checkpoint intervals, and checkpoint duration exceeds the configured timeout. -- Check: Enable DEBUG logging for `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator`, then `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | grep -oP 'cost: \d+ms'` to see checkpoint durations. +- Check: Enable DEBUG logging for `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator`, then `grep "pending checkpoint completed" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | grep -oP 'cost: \d+ms'` to see checkpoint durations. - If using S3: Run `aws s3api head-object --bucket --key ` to measure latency, or check CloudWatch S3 metrics (`FirstByteLatency`, `TotalRequestLatency`). - Common cause: High network latency to S3/HDFS, small files causing many round trips, or S3 throttling. - Mitigation: See [Section 6](#6-s3-checkpointstate-storage-latency). @@ -307,7 +311,7 @@ SeaTunnel outputs health monitor logs periodically (every 60 seconds by default) ```bash # Extract slow operation warnings with their durations -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -20 +grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tail -20 ``` #### 4.3 Node Resource Metrics @@ -373,7 +377,7 @@ curl -w "DNS: %{time_namelookup}s, Connect: %{time_connect}s, TTFB: %{time_start **Check checkpoint write performance:** ```bash # Monitor checkpoint duration from logs (requires DEBUG logging for CheckpointCoordinator) -grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | \ +grep "pending checkpoint completed" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | \ grep -oP 'cost: \d+ms' | sort -t: -k2 -nr | head -20 ``` diff --git a/docs/zh/engines/zeta/checkpoint-storage.md b/docs/zh/engines/zeta/checkpoint-storage.md index b1f58ade27b9..6bee47ac96d9 100644 --- a/docs/zh/engines/zeta/checkpoint-storage.md +++ b/docs/zh/engines/zeta/checkpoint-storage.md @@ -309,7 +309,7 @@ seatunnel: namespace: # 检查点存储父路径,默认值为/seatunnel/checkpoint/ storage.type: hdfs fs.defaultFS: hdfs://localhost:9000 - // 如果您使用kerberos,您可以这样配置: + # 如果您使用kerberos,您可以这样配置: kerberosPrincipal: your-kerberos-principal kerberosKeytabFilePath: your-kerberos-keytab ``` diff --git a/docs/zh/engines/zeta/hybrid-cluster-deployment.md b/docs/zh/engines/zeta/hybrid-cluster-deployment.md index fba55247eb65..b59101405fa1 100644 --- a/docs/zh/engines/zeta/hybrid-cluster-deployment.md +++ b/docs/zh/engines/zeta/hybrid-cluster-deployment.md @@ -444,7 +444,7 @@ mkdir -p $SEATUNNEL_HOME/logs ./bin/seatunnel-cluster.sh -d ``` -日志将写入 `$SEATUNNEL_HOME/logs/` 目录(例如 `seatunnel-engine-master.log` 和 `seatunnel-engine-worker.log`) +日志将写入 `$SEATUNNEL_HOME/logs/` 目录——默认的 master-and-worker 部署写入 `seatunnel-engine-server.log` ## 8. 提交作业和管理作业 diff --git a/docs/zh/engines/zeta/log-analysis-with-ai.md b/docs/zh/engines/zeta/log-analysis-with-ai.md index c5875a12ca7f..178647c8de3e 100644 --- a/docs/zh/engines/zeta/log-analysis-with-ai.md +++ b/docs/zh/engines/zeta/log-analysis-with-ai.md @@ -46,7 +46,7 @@ SeaTunnel 默认将进程日志写入 `$SEATUNNEL_HOME/logs`。集群启动脚 ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME/logs/seatunnel-engine-master.log" \ +grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log # seatunnel-engine-server.log (hybrid) / -master.log / -worker.log (separated) \ "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log ``` diff --git a/docs/zh/engines/zeta/tuning-guide.md b/docs/zh/engines/zeta/tuning-guide.md index 899a61fc4ad8..abc9c86b5a80 100644 --- a/docs/zh/engines/zeta/tuning-guide.md +++ b/docs/zh/engines/zeta/tuning-guide.md @@ -20,11 +20,14 @@ SeaTunnel Engine 是基于 [JVM](https://zh.wikipedia.org/wiki/Java%E8%99%9A%E6% ##### 排查流程 1. 检查 JVM 堆内存实时占用 - 使用 `jcmd` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。`jcmd GC.heap_info` 在 JDK 8 及以上均可用(`jmap -heap` 在 JDK 9+ 已移除)。 + 使用 `jcmd` 命令查看 JVM 堆内存使用情况, 其中 `` 是 SeaTunnel Engine 进程的 PID。JDK 9+ 使用 `jcmd GC.heap_info`;JDK 8 使用 `jmap -heap `(该参数在 JDK 9+ 已移除)。 ```bash + # JDK 9+ jcmd GC.heap_info + # JDK 8 + jmap -heap ``` - 输出结果示例(JDK 8 主机上 `jmap -heap` 风格的输出,仅供参考): + 输出结果示例(JDK 8 主机上 `jmap -heap` 风格的输出): ```shell Attaching to process ID 2111950, please wait... Debugger attached successfully. @@ -169,7 +172,8 @@ Hazelcast 的 `SlowOperationDetector` 监控分区线程上的操作执行时间 ```bash # 检查慢操作日志的频率和时间 -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -50 +grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tail -50 +# seatunnel-engine-server.log on the default hybrid deployment; -master.log / -worker.log when roles are separated ``` 将时间戳与以下事件关联: @@ -190,7 +194,7 @@ free -h **REST 提交延迟:** - 症状:通过 REST API 提交作业时出现慢操作,且提交客户端响应时间较长。 -- 检查:`grep "submitJob" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log` —— 关注耗时。 +- 检查:`grep "submitJob" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log` —— 关注耗时。 - 常见原因:Master 节点并发提交过载,或作业配置非常庞大(连接器/Transform 数量多)。 - 缓解:限制并发提交速率、增加 Master 节点资源、或调整 `hazelcast.operation.generic.thread.count`。 @@ -208,7 +212,7 @@ free -h **Checkpoint 存储延迟:** - 症状:慢操作与 Checkpoint 间隔对齐,且 Checkpoint 耗时超过配置的超时。 -- 检查:为 `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator` 启用 DEBUG 日志,然后执行 `grep "pending checkpoint completed" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | grep -oP 'cost: \d+ms'` 查看 Checkpoint 耗时。 +- 检查:为 `org.apache.seatunnel.engine.server.checkpoint.CheckpointCoordinator` 启用 DEBUG 日志,然后执行 `grep "pending checkpoint completed" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | grep -oP 'cost: \d+ms'` 查看 Checkpoint 耗时。 - 如果使用 S3:运行 `aws s3api head-object --bucket --key ` 测量延迟,或查看 CloudWatch S3 指标(`FirstByteLatency`、`TotalRequestLatency`)。 - 常见原因:到 S3/HDFS 的网络延迟高、小文件导致多次往返、或 S3 限流。 - 缓解:参见[第 6 节](#6-s3-checkpoint状态存储延迟)。 @@ -307,7 +311,7 @@ SeaTunnel 定期输出健康监控日志(默认每 60 秒一次)。这些日 ```bash # 提取慢操作告警及其耗时 -grep "SlowOperationDetector" $SEATUNNEL_HOME/logs/seatunnel-engine-master.log | tail -20 +grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tail -20 ``` #### 4.3 节点资源指标 From 9f85fe9ae2234986cc8a88a6d4887952749e294d Mon Sep 17 00:00:00 2001 From: jast Date: Tue, 3 Nov 2026 23:40:06 +0800 Subject: [PATCH 5/5] [Docs] Fix broken log-collection command and zh comment language - log-analysis-with-ai.md (EN/ZH): the role-mapping comment inserted in front of a line-continuation backslash turned the two-line command into a broken one (empty job.log); collapse to a single grep with -h and move the comment to its own line. - tuning-guide.md (ZH): translate the new role-mapping comment into Chinese to match the rest of the page. --- docs/en/engines/zeta/log-analysis-with-ai.md | 4 ++-- docs/zh/engines/zeta/log-analysis-with-ai.md | 4 ++-- docs/zh/engines/zeta/tuning-guide.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/engines/zeta/log-analysis-with-ai.md b/docs/en/engines/zeta/log-analysis-with-ai.md index 2b4b50226553..662606dd1d64 100644 --- a/docs/en/engines/zeta/log-analysis-with-ai.md +++ b/docs/en/engines/zeta/log-analysis-with-ai.md @@ -55,8 +55,8 @@ When logs are mixed, use the `ST-JID` value to select one job. For example: ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log # seatunnel-engine-server.log (hybrid) / -master.log / -worker.log (separated) \ - "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log +# seatunnel-engine-server.log (hybrid); seatunnel-engine-master.log / -worker.log (separated) +grep -hF "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log > job.log ``` If per-job routing is enabled, inspect `job-.log`. In a multi-node Zeta cluster, collect diff --git a/docs/zh/engines/zeta/log-analysis-with-ai.md b/docs/zh/engines/zeta/log-analysis-with-ai.md index 178647c8de3e..1e3f548a80cf 100644 --- a/docs/zh/engines/zeta/log-analysis-with-ai.md +++ b/docs/zh/engines/zeta/log-analysis-with-ai.md @@ -46,8 +46,8 @@ SeaTunnel 默认将进程日志写入 `$SEATUNNEL_HOME/logs`。集群启动脚 ```shell JOB_ID= -grep -F "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log # seatunnel-engine-server.log (hybrid) / -master.log / -worker.log (separated) \ - "$SEATUNNEL_HOME/logs/seatunnel-engine-worker.log" > job.log +# seatunnel-engine-server.log(hybrid);seatunnel-engine-master.log / -worker.log(分离部署) +grep -hF "[${JOB_ID}]" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log > job.log ``` 如果启用了按作业路由,请检查 `job-.log`。在多节点 Zeta 集群中,需要同时收集 Master 和执行该作业的 Worker 日志。当前 Master 还提供以下 REST 接口: diff --git a/docs/zh/engines/zeta/tuning-guide.md b/docs/zh/engines/zeta/tuning-guide.md index abc9c86b5a80..d4f4287d647b 100644 --- a/docs/zh/engines/zeta/tuning-guide.md +++ b/docs/zh/engines/zeta/tuning-guide.md @@ -173,7 +173,7 @@ Hazelcast 的 `SlowOperationDetector` 监控分区线程上的操作执行时间 ```bash # 检查慢操作日志的频率和时间 grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tail -50 -# seatunnel-engine-server.log on the default hybrid deployment; -master.log / -worker.log when roles are separated +# 默认的 master-and-worker 部署写入 seatunnel-engine-server.log;master/worker 分离部署分别写入 -master.log / -worker.log ``` 将时间戳与以下事件关联: