This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/dev/pr-12641-e594ea5ff88b0b3ca4ac9a5b9930684872d58cf4 in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit a9ecf251993a410d48112b96592a7ee2fb84ce37 Author: Jast <[email protected]> AuthorDate: Wed Nov 25 14:13:50 2026 +0000 [Docs] Fix Zeta engine doc inaccuracies verified against source code (#12641) Co-authored-by: jast <[email protected]> Co-authored-by: davidzollo <[email protected]> Co-authored-by: zhiwei.niu <[email protected]> --- docs/en/engines/command/usage.mdx | 38 +++++++++++++++++- docs/en/engines/overview.md | 2 +- docs/en/engines/zeta/checkpoint-storage.md | 1 + docs/en/engines/zeta/rest-api-v1.md | 12 +++++- docs/en/engines/zeta/rest-api-v2.md | 20 ++++++---- docs/en/engines/zeta/telemetry.md | 12 ++++-- docs/en/engines/zeta/tuning-guide.md | 5 ++- docs/en/engines/zeta/user-command.md | 2 +- docs/zh/engines/command/usage.mdx | 36 +++++++++++++++++ docs/zh/engines/overview.md | 2 +- docs/zh/engines/zeta/checkpoint-storage.md | 26 ++++++++++++- docs/zh/engines/zeta/deployment.md | 4 +- docs/zh/engines/zeta/hybrid-cluster-deployment.md | 45 +++++++++++++++++++++- docs/zh/engines/zeta/rest-api-job-lifecycle.md | 3 +- docs/zh/engines/zeta/rest-api-v1.md | 22 +++++++---- docs/zh/engines/zeta/rest-api-v2.md | 25 +++++++----- .../engines/zeta/separated-cluster-deployment.md | 44 ++++++++++++++++++++- docs/zh/engines/zeta/telemetry.md | 12 ++++-- docs/zh/engines/zeta/tuning-guide.md | 5 ++- docs/zh/engines/zeta/user-command.md | 2 +- 20 files changed, 268 insertions(+), 50 deletions(-) diff --git a/docs/en/engines/command/usage.mdx b/docs/en/engines/command/usage.mdx index 53fac4dd4e..b3a0045837 100644 --- a/docs/en/engines/command/usage.mdx +++ b/docs/en/engines/command/usage.mdx @@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem'; {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -43,6 +44,13 @@ bin/start-seatunnel-flink-13-connector-v2.sh bin/start-seatunnel-flink-15-connector-v2.sh ``` +</TabItem> +<TabItem value="flink20"> + +```bash +bin/start-seatunnel-flink-20-connector-v2.sh +``` + </TabItem> </Tabs> @@ -57,6 +65,7 @@ bin/start-seatunnel-flink-15-connector-v2.sh {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -129,7 +138,26 @@ Usage: start-seatunnel-flink-15-connector-v2.sh [options] remote, yarn-session, yarn-per-job, kubernetes-session, yarn-application, kubernetes-application] -n, --name SeaTunnel job name (default: SeaTunnel) - -i, --variable Variable substitution, such as -i city=beijing, or -i + -i, --variable Variable substitution, such as -i city=beijing, or -i + date=20190318 (default: []) +``` + +</TabItem> +<TabItem value="flink20"> + +```bash +Usage: start-seatunnel-flink-20-connector-v2.sh [options] + Options: + --check Whether check config (default: false) + -c, --config Config file + -e, --deploy-mode Flink job deploy mode, support [run, run-application] + (default: run) + -h, --help Show the usage message + --master, --target Flink job submitted target master, support [local, + remote, yarn-session, yarn-per-job, kubernetes-session, + yarn-application, kubernetes-application] + -n, --name SeaTunnel job name (default: SeaTunnel) + -i, --variable Variable substitution, such as -i city=beijing, or -i date=20190318 (default: []) ``` @@ -146,6 +174,7 @@ Usage: start-seatunnel-flink-15-connector-v2.sh [options] {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -174,5 +203,12 @@ bin/start-seatunnel-flink-13-connector-v2.sh --config config/v2.batch.config.tem bin/start-seatunnel-flink-15-connector-v2.sh --config config/v2.batch.config.template ``` +</TabItem> +<TabItem value="flink20"> + +```bash +bin/start-seatunnel-flink-20-connector-v2.sh --config config/v2.batch.config.template +``` + </TabItem> </Tabs> diff --git a/docs/en/engines/overview.md b/docs/en/engines/overview.md index 83e995e061..08b1e5c3fb 100644 --- a/docs/en/engines/overview.md +++ b/docs/en/engines/overview.md @@ -195,7 +195,7 @@ env { ## Connector Compatibility -All SeaTunnel V2 connectors are compatible with all three engines. However, some features may have different behaviors: +Most SeaTunnel V2 connectors are compatible with all three engines, but not all of them (for example, CDC connectors are not supported on Spark). Some features may also have different behaviors: | Connector Feature | SeaTunnel Engine | Flink | Spark | |-------------------|------------------|-------|-------| diff --git a/docs/en/engines/zeta/checkpoint-storage.md b/docs/en/engines/zeta/checkpoint-storage.md index f92132336b..7a97dc216a 100644 --- a/docs/en/engines/zeta/checkpoint-storage.md +++ b/docs/en/engines/zeta/checkpoint-storage.md @@ -318,6 +318,7 @@ seatunnel: fs.s3a.access.key: xxxxxxxxx # Access Key of MinIO fs.s3a.secret.key: xxxxxxxxxxxxxxxxxxxxx # Secret Key of MinIO fs.s3a.endpoint: http://127.0.0.1:9000 # Minio HTTP service access address + fs.s3a.path.style.access: true s3.bucket: s3a://test # test is the bucket name which storage the checkpoint file fs.s3a.aws.credentials.provider: org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider # important: The user of this key needs to have write permission for the bucket, otherwise an exception of 403 will be returned diff --git a/docs/en/engines/zeta/rest-api-v1.md b/docs/en/engines/zeta/rest-api-v1.md index 59daef25f7..97ac8220a5 100644 --- a/docs/en/engines/zeta/rest-api-v1.md +++ b/docs/en/engines/zeta/rest-api-v1.md @@ -288,6 +288,7 @@ None. "envOptions": { }, "createTime": "", + "startTime": "", "jobDag": { "jobId": "", "envOptions": [], @@ -399,7 +400,7 @@ None. } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` always be returned. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` always be returned. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` will return when job is running. `finishTime`, `errorMsg` will return when job is finished. A running job also returns a `diagnostics` block (state timestamps and per-pipeline restore counts), @@ -513,7 +514,7 @@ This API has been deprecated, please use /hazelcast/rest/maps/job-info/:jobId in } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` always be returned. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` always be returned. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` will return when job is running. `finishTime`, `errorMsg` will return when job is finished. @@ -550,6 +551,7 @@ When we can't get the job info, the response contains only the requested `jobId` "jobStatus": "", "errorMsg": null, "createTime": "", + "startTime": "", "finishTime": "", "jobDag": { "jobId": "", @@ -658,6 +660,9 @@ Each member is asked in parallel and awaited against one shared deadline (`seatu > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | +> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | +> | restoreSourceJobId | optional | string | ID of the job to restore. Required for `CHECKPOINT`. In `SAVEPOINT` mode, the server uses `jobId` if this parameter is omitted. | +> | format | optional | string | config format, support json, hocon and sql, default json | #### Body @@ -716,6 +721,9 @@ Each member is asked in parallel and awaited against one shared deadline (`seatu > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if the job is started with > save point | +> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | +> | restoreSourceJobId | optional | string | ID of the job to restore. Required for `CHECKPOINT`. In `SAVEPOINT` mode, the server uses `jobId` if this parameter is omitted. | +> | format | optional | string | config format, support json, hocon and sql, default json | #### Request Body diff --git a/docs/en/engines/zeta/rest-api-v2.md b/docs/en/engines/zeta/rest-api-v2.md index 874114cadd..369feb2d07 100644 --- a/docs/en/engines/zeta/rest-api-v2.md +++ b/docs/en/engines/zeta/rest-api-v2.md @@ -357,6 +357,7 @@ None. "envOptions": { }, "createTime": "", + "startTime": "", "jobDag": { "jobId": "", "envOptions": [], @@ -680,7 +681,7 @@ This endpoint helps troubleshoot why jobs stay in `PENDING` by showing the pendi } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` always be returned. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` always be returned. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` will return when job is running. `finishTime`, `errorMsg` will return when job is finished. `diagnostics` will return when the job is running and its diagnostics can be read from the master @@ -798,7 +799,11 @@ This API has been deprecated, please use /job-info/:jobId instead "TableSinkWriteCount": {}, "TableSinkWriteQPS": {}, "TableSinkWriteBytes": {}, - "TableSinkWriteBytesPerSeconds": {} + "TableSinkWriteBytesPerSeconds": {}, + "TableSinkCommittedCount": {}, + "TableSinkCommittedQPS": {}, + "TableSinkCommittedBytes": {}, + "TableSinkCommittedBytesPerSeconds": {} }, "finishTime": "", "errorMsg": null, @@ -810,7 +815,7 @@ This API has been deprecated, please use /job-info/:jobId instead } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` always be returned. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` always be returned. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` will return when job is running. `finishTime`, `errorMsg` will return when job is finished. @@ -857,6 +862,7 @@ starting beyond the end of the result set also returns `400`, while a page start "jobStatus": "", "errorMsg": null, "createTime": "", + "startTime": "", "finishTime": "", "jobDag": { "jobId": "", @@ -962,8 +968,8 @@ Each member is asked in parallel and awaited against one shared deadline (`seatu > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | -> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. Used together with `restoreSourceJobId`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | -> | restoreSourceJobId | optional | string | The job id to restore from when `restoreMode` is set. When only `isStartWithSavePoint` is set (no `restoreMode`), this falls back to `jobId`. | +> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | +> | restoreSourceJobId | optional | string | ID of the job to restore. Required for `CHECKPOINT`. In `SAVEPOINT` mode, the server uses `jobId` if this parameter is omitted. | > | format | optional | string | config format, support json, > hocon and sql, default json | **Note:** The dry-run feature is intentionally not supported via the REST API. It is exclusively available through the SeaTunnel CLI. @@ -1100,8 +1106,8 @@ INSERT INTO console_sink SELECT * FROM fake_source; > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | -> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. Used together with `restoreSourceJobId`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | -> | restoreSourceJobId | optional | string | The job id to restore from when `restoreMode` is set. When only `isStartWithSavePoint` is set (no `restoreMode`), this falls back to `jobId`. | +> | restoreMode | optional | string | Restore source for job recovery: `CHECKPOINT` or `SAVEPOINT`. See [Job Recovery and Restart](rest-api-job-lifecycle.md#6-job-recovery-and-restart). | +> | restoreSourceJobId | optional | string | ID of the job to restore. Required for `CHECKPOINT`. In `SAVEPOINT` mode, the server uses `jobId` if this parameter is omitted. | #### Request Body The name of the uploaded file key is config_file, and supports the following formats: diff --git a/docs/en/engines/zeta/telemetry.md b/docs/en/engines/zeta/telemetry.md index a1323de696..1d33e25dc4 100644 --- a/docs/en/engines/zeta/telemetry.md +++ b/docs/en/engines/zeta/telemetry.md @@ -34,7 +34,10 @@ seatunnel: The metric text of prometheus can be obtained from `http://{instanceHost}:5801/hazelcast/rest/instance/metrics`. -The metric text of openMetrics can be obtained from `http://{instanceHost}:5801/hazelcast/rest/instance/openmetrics`. +The metric text of openMetrics can be obtained from `http://{instanceHost}:8080/openmetrics`. + +The Hazelcast REST API also serves OpenMetrics at `http://{instanceHost}:5801/hazelcast/rest/instance/openmetrics`. +Set `hazelcast.network.rest-api.enabled: true` in `hazelcast.yaml` to use the Hazelcast endpoints. Available metrics include the following categories. @@ -268,12 +271,13 @@ scrape_configs: # The job name assigned to scraped metrics by default. - job_name: 'seatunnel' scrape_interval: 5s - # Metrics export path - metrics_path: /hazelcast/rest/instance/metrics + # Metrics export path (served by the Jetty HTTP server; use /hazelcast/rest/instance/metrics + # on port 5801 only if Hazelcast rest-api is enabled) + metrics_path: /metrics # List of labeled statically configured targets for this job. static_configs: # The targets specified by the static config. - - targets: [ 'localhost:5801' ] + - targets: [ 'localhost:8080' ] # Labels assigned to all metrics scraped from the targets. # labels: [<labelName>:<labelValue>] ``` diff --git a/docs/en/engines/zeta/tuning-guide.md b/docs/en/engines/zeta/tuning-guide.md index 1ab36f42ad..d0738f214a 100644 --- a/docs/en/engines/zeta/tuning-guide.md +++ b/docs/en/engines/zeta/tuning-guide.md @@ -180,7 +180,7 @@ grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tai Correlate the timestamps with: - Job submission events (REST API calls) -- Checkpoint intervals (the engine default is 300000 ms; the shipped `config/seatunnel.yaml` template sets `checkpoint.interval: 10000`) +- Checkpoint interval (`seatunnel.engine.checkpoint.interval`): the code default is 300000 ms (5 minutes); the shipped `config/seatunnel.yaml` sets 10000 ms. - High-load periods (peak data ingestion) #### Step 2: Check overall node health @@ -406,6 +406,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 namespace: /seatunnel/checkpoint/ s3.bucket: s3a://<your-bucket> fs.s3a.endpoint: s3.<region>.amazonaws.com @@ -419,6 +420,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 fs.s3a.fast.upload: true s3.bucket: s3a://<your-bucket> fs.s3a.fast.upload.buffer: disk @@ -434,6 +436,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 fs.s3a.attempts.maximum: 10 s3.bucket: s3a://<your-bucket> fs.s3a.connection.timeout: 30000 diff --git a/docs/en/engines/zeta/user-command.md b/docs/en/engines/zeta/user-command.md index 3b1bac54d5..a9231d2fd3 100644 --- a/docs/en/engines/zeta/user-command.md +++ b/docs/en/engines/zeta/user-command.md @@ -4,7 +4,7 @@ sidebar_position: 13 # Client Command Line Tool -The SeaTunnel Engine provides a command line tool for managing the jobs of the SeaTunnel Engine. You can use the command line tool to submit, stop, pause, resume, delete jobs, view job status and monitoring metrics, etc. +The SeaTunnel Engine provides a command line tool for managing the jobs of the SeaTunnel Engine. You can use the command line tool to submit, stop, savepoint, restore jobs, view job status and monitoring metrics, etc. (There is no dedicated command for deleting jobs; finished job records are removed automatically after `history-job-expire-minutes` elapses.) You can obtain the help information of the command line tool through the following command: diff --git a/docs/zh/engines/command/usage.mdx b/docs/zh/engines/command/usage.mdx index 72c3243001..d291868760 100644 --- a/docs/zh/engines/command/usage.mdx +++ b/docs/zh/engines/command/usage.mdx @@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem'; {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -43,6 +44,13 @@ bin/start-seatunnel-flink-13-connector-v2.sh bin/start-seatunnel-flink-15-connector-v2.sh ``` +</TabItem> +<TabItem value="flink20"> + +```bash +bin/start-seatunnel-flink-20-connector-v2.sh +``` + </TabItem> </Tabs> @@ -57,6 +65,7 @@ bin/start-seatunnel-flink-15-connector-v2.sh {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -133,6 +142,25 @@ bin/start-seatunnel-flink-15-connector-v2.sh date=20190318 (默认: []) ``` +</TabItem> +<TabItem value="flink20"> + +```bash +用法: start-seatunnel-flink-20-connector-v2.sh [选项] + 选项: + --check 是否检查配置 (默认: false) + -c, --config 配置文件 + -e, --deploy-mode Flink 作业部署模式,支持 [run, run-application] + (默认: run) + -h, --help 显示使用说明 + --master, --target Flink 作业提交目标 master,支持 [local, + remote, yarn-session, yarn-per-job, kubernetes-session, + yarn-application, kubernetes-application] + -n, --name SeaTunnel 作业名称 (默认: SeaTunnel) + -i, --variable 变量替换,例如 -i city=beijing,或 -i + date=20190318 (默认: []) +``` + </TabItem> </Tabs> @@ -146,6 +174,7 @@ bin/start-seatunnel-flink-15-connector-v2.sh {label: 'Spark 3', value: 'spark3'}, {label: 'Flink 13 14', value: 'flink13'}, {label: 'Flink 15 16', value: 'flink15'}, + {label: 'Flink 1.20', value: 'flink20'}, ]}> <TabItem value="spark2"> @@ -174,5 +203,12 @@ bin/start-seatunnel-flink-13-connector-v2.sh --config config/v2.batch.config.tem bin/start-seatunnel-flink-15-connector-v2.sh --config config/v2.batch.config.template ``` +</TabItem> +<TabItem value="flink20"> + +```bash +bin/start-seatunnel-flink-20-connector-v2.sh --config config/v2.batch.config.template +``` + </TabItem> </Tabs> diff --git a/docs/zh/engines/overview.md b/docs/zh/engines/overview.md index 472f520208..5fe184fdb1 100644 --- a/docs/zh/engines/overview.md +++ b/docs/zh/engines/overview.md @@ -195,7 +195,7 @@ env { ## 连接器兼容性 -所有 SeaTunnel V2 连接器都与三种引擎兼容。但某些功能在不同引擎上可能有不同的行为: +大多数 SeaTunnel V2 连接器都与三种引擎兼容,但并非全部(例如 CDC 连接器不支持 Spark)。此外某些功能在不同引擎上可能有不同的行为: | 连接器功能 | SeaTunnel Engine | Flink | Spark | |-----------|------------------|-------|-------| diff --git a/docs/zh/engines/zeta/checkpoint-storage.md b/docs/zh/engines/zeta/checkpoint-storage.md index d5ce8f630e..0c21f347fb 100644 --- a/docs/zh/engines/zeta/checkpoint-storage.md +++ b/docs/zh/engines/zeta/checkpoint-storage.md @@ -294,6 +294,30 @@ seatunnel: 有关Hadoop Credential Provider API的更多信息,请参见: [Credential Provider API](https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/CredentialProviderAPI.html). +如果您想使用支持 S3 协议的 Minio 作为检查点存储,可以这样配置: + +```yaml + +seatunnel: + engine: + checkpoint: + interval: 10000 + timeout: 60000 + storage: + type: hdfs + max-retained: 3 + plugin-config: + namespace: # 检查点存储父路径,默认值为/seatunnel/checkpoint/ + storage.type: s3 + fs.s3a.access.key: xxxxxxxxx # MinIO 的 Access Key + fs.s3a.secret.key: xxxxxxxxxxxxxxxxxxxxx # MinIO 的 Secret Key + fs.s3a.endpoint: http://127.0.0.1:9000 # Minio HTTP 服务访问地址 + fs.s3a.path.style.access: true + s3.bucket: s3a://test # test 为存储检查点文件的 bucket 名称 + fs.s3a.aws.credentials.provider: org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider + # 重要:该 key 的用户需要有 bucket 的写权限,否则会返回 403 异常 +``` + #### HDFS 如果您使用HDFS,您可以这样配置: @@ -312,7 +336,7 @@ seatunnel: # 如果您使用kerberos,您可以这样配置: kerberosPrincipal: your-kerberos-principal kerberosKeytabFilePath: your-kerberos-keytab - # 如果您需要hdfs-site配置,您可以这样配置: + # 如果您需要 hdfs-site 配置,您可以这样配置: hdfs_site_path: /path/to/your/hdfs_site_path ``` diff --git a/docs/zh/engines/zeta/deployment.md b/docs/zh/engines/zeta/deployment.md index 3ff895f47b..4f45f56f20 100644 --- a/docs/zh/engines/zeta/deployment.md +++ b/docs/zh/engines/zeta/deployment.md @@ -12,9 +12,9 @@ Local模式:只用于测试,每个任务都会启动一个独立的进程, 混合集群模式:SeaTunnel Engine 的Master服务和Worker服务混合在同一个进程中,所有节点都可以运行作业并参与选举成为master,即master节点也在同时运行同步任务。在该模式下,Imap(保存任务的状态信息用于为任务的容错提供支持)数据会分布在所有节点中。 -分离集群模式:SeaTunnel Engine 的Master服务和Worker服务分离,每个服务单独一个进程。Master节点只负责作业调度,rest api,任务提交等,Imap数据只存储在Master节点中。Worker节点只负责任务的执行,不参与选举成为master,也不存储Imap数据。 +分离集群模式(实验性功能):SeaTunnel Engine 的Master服务和Worker服务分离,每个服务单独一个进程。Master节点只负责作业调度,rest api,任务提交等,Imap数据只存储在Master节点中。Worker节点只负责任务的执行,不参与选举成为master,也不存储Imap数据。 -使用建议:建议使用[分离集群模式](separated-cluster-deployment.md)。在混合集群模式下,Master节点要同步运行任务,当任务规模较大时,会影响Master节点的稳定性,一但Master节点宕机或心跳超时,会导致Master节点切换,Master节点切换会导致所有正在运行的任务进行容错,会进一步增长集群的负载。因此,我们更建议使用分离模式。 +使用建议:虽然[分离集群模式](separated-cluster-deployment.md)目前仍是实验性功能,但它是未来首推的使用方式。在混合集群模式下,Master节点要同步运行任务,当任务规模较大时,会影响Master节点的稳定性,一但Master节点宕机或心跳超时,会导致Master节点切换,Master节点切换会导致所有正在运行的任务进行容错,会进一步增长集群的负载。因此,我们更建议使用分离模式。 [Local模式部署](local-mode-deployment.md) diff --git a/docs/zh/engines/zeta/hybrid-cluster-deployment.md b/docs/zh/engines/zeta/hybrid-cluster-deployment.md index d338f2b35a..b8df1d37c5 100644 --- a/docs/zh/engines/zeta/hybrid-cluster-deployment.md +++ b/docs/zh/engines/zeta/hybrid-cluster-deployment.md @@ -218,8 +218,8 @@ seatunnel: ```yaml seatunnel: -engine: -job-metrics-partition-count: 4 + engine: + job-metrics-partition-count: 4 ``` 上述配置会将指标分布到 4 个分区中,而不是使用单个 key。 @@ -384,6 +384,47 @@ netty-common-4.1.89.Final.jar seatunnel-shade-hadoop3-uber-*.jar ``` +可以使用 S3 进行 IMap 持久化存储。 + +S3 的配置属性遵循 Hadoop S3A 文件系统(Native S3)标准。具体来说,我们使用 fs.s3a.access.key 和 fs.s3a.secret.key 属性,以确保与现有基于 Hadoop 的生态系统兼容。 + +如果您想使用 S3 兼容存储(例如 Minio),可以这样配置: + + +```yaml +map: + engine*: + map-store: + enabled: true + initial-mode: EAGER + factory-class-name: org.apache.seatunnel.engine.server.persistence.FileMapStoreFactory + properties: + type: hdfs + namespace: /seatunnel/engine + clusterName: seatunnel + storage.type: s3 + s3.bucket: s3a://your-bucket + fs.defaultFS: s3a://your-bucket + fs.s3a.endpoint: http://your-minio-endpoint:port + fs.s3a.path.style.access: true + fs.s3a.access.key: YOUR_ACCESS_KEY + fs.s3a.secret.key: YOUR_SECRET_KEY + fs.s3a.aws.credentials.provider: org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider +``` + +注意:使用 S3 时,确保 lib 目录下有以下几个 jar。 + +以下两个 JAR 均来自 [Apache SeaTunnel Shade](https://github.com/apache/seatunnel-shade) 项目: +- `seatunnel-shade-hadoop3-uber` — 包重定位后的 shaded Hadoop 客户端 +- `seatunnel-shade-hadoop-aws` — 包重定位后的 shaded Hadoop AWS 连接器 + +版本号格式为 `${library.version}-${seatunnel.shade.version}`(例如 `3.1.4-3.0.0`),具体版本请参考 SeaTunnel 发行包中实际包含的 JAR 文件名。 + +``` +seatunnel-shade-hadoop3-uber-${seatunnel.shade.hadoop.version}-${seatunnel.shade.version}.jar +seatunnel-shade-hadoop-aws-${seatunnel.shade.hadoop-aws.version}-${seatunnel.shade.version}.jar +``` + 如果您使用 GCS,可以像这样配置: ```yaml diff --git a/docs/zh/engines/zeta/rest-api-job-lifecycle.md b/docs/zh/engines/zeta/rest-api-job-lifecycle.md index c806532ebf..08d67efb0b 100644 --- a/docs/zh/engines/zeta/rest-api-job-lifecycle.md +++ b/docs/zh/engines/zeta/rest-api-job-lifecycle.md @@ -324,7 +324,8 @@ curl -X POST "http://<master>:8080/submit-job?restoreMode=SAVEPOINT&restoreSourc REST API 不支持指定具体的 Savepoint 路径进行恢复。不存在 `restore.mode` 或 `savepoint.path` 之类的 env 选项;恢复行为只由请求参数 `restoreMode` 和 `restoreSourceJobId` 控制,并且 `restoreMode=SAVEPOINT` 总是选取所引用作业**最新**的 Savepoint(按 pipeline 取 checkpoint id 最高的那 -个)。REST API 没有选择更早 Savepoint 的受支持方式。 +个)。REST API 没有选择更早 Savepoint 的受支持方式。恢复来源也可由 CLI 的 `--restore` / +`--restore-with-checkpoint` 参数指定。 --- diff --git a/docs/zh/engines/zeta/rest-api-v1.md b/docs/zh/engines/zeta/rest-api-v1.md index c54b5e2ec5..853c9bad2d 100644 --- a/docs/zh/engines/zeta/rest-api-v1.md +++ b/docs/zh/engines/zeta/rest-api-v1.md @@ -247,10 +247,9 @@ network: <details> <summary><code>GET</code> <code><b>/hazelcast/rest/maps/thread-dump</b></code> <code>(返回当前节点的线程堆栈信息。)</code></summary> -#### Parameters - +#### 参数 -#### Responses +#### 响应 ```json [ @@ -286,6 +285,7 @@ network: "envOptions": { }, "createTime": "", + "startTime": "", "jobDag": { "jobId": "", "envOptions": [], @@ -419,9 +419,9 @@ network: } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` 字段总会返回. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` 字段总会返回. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` 字段在Job在RUNNING状态时会返回 -`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCEL +`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCELED 运行中的Job还会返回 `diagnostics` 字段(状态时间戳与各 Pipeline 的恢复次数),字段说明见 [REST API V2](rest-api-v2.md)。该字段只在本接口返回,`/running-jobs` 不返回。 #### 指标字段说明 @@ -508,9 +508,9 @@ network: } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` 字段总会返回. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` 字段总会返回. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` 字段在Job在RUNNING状态时会返回 -`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCEL +`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCELED 当我们查询不到这个Job时,返回结果只包含请求的 `jobId`: @@ -545,6 +545,7 @@ network: "jobStatus": "", "errorMsg": null, "createTime": "", + "startTime": "", "finishTime": "", "jobDag": { "jobId": "", @@ -653,6 +654,9 @@ network: > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | +> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | +> | restoreSourceJobId | optional | string | 要恢复的作业 ID,使用 `CHECKPOINT` 时必填。使用 `SAVEPOINT` 时,省略此参数则使用 `jobId`。 | +> | format | optional | string | 配置风格,支持json、hocon 和 sql,默认 json | #### 请求体 @@ -712,7 +716,9 @@ network: > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | - +> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | +> | restoreSourceJobId | optional | string | 要恢复的作业 ID,使用 `CHECKPOINT` 时必填。使用 `SAVEPOINT` 时,省略此参数则使用 `jobId`。 | +> | format | optional | string | 配置风格,支持json、hocon 和 sql,默认 json | #### 请求体 diff --git a/docs/zh/engines/zeta/rest-api-v2.md b/docs/zh/engines/zeta/rest-api-v2.md index b6363c2559..ce5b361d5a 100644 --- a/docs/zh/engines/zeta/rest-api-v2.md +++ b/docs/zh/engines/zeta/rest-api-v2.md @@ -350,6 +350,7 @@ seatunnel: "jobName": "", "jobStatus": "", "createTime": "", + "startTime": "", "jobDag": { "jobId": "", "envOptions": [], @@ -671,9 +672,9 @@ seatunnel: } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` 字段总会返回. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` 字段总会返回. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` 字段在Job在RUNNING状态时会返回 -`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCEL +`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCELED `diagnostics` 字段在Job运行中且能从Master节点读取到诊断信息时返回。它属于辅助信息,读取失败时该字段会被省略,不会导致请求失败。该字段只在本接口返回,`/running-jobs` 不返回:为列表中的每个Job收集诊断信息会额外增加一次到Master的请求。 `diagnostics` 读取的是 Master 内存中的 Job 状态,因此与 `restoreCount` 一样,它描述的是当前这个 Master 对该 Job 的视图,而不是完整历史。Master 切换后,恢复计数与 `restoreCauses` 会从被恢复的 Job 重新开始,上一个 Master 记录的原因不会延续。 @@ -783,7 +784,11 @@ seatunnel: "TableSinkWriteCount": {}, "TableSinkWriteQPS": {}, "TableSinkWriteBytes": {}, - "TableSinkWriteBytesPerSeconds": {} + "TableSinkWriteBytesPerSeconds": {}, + "TableSinkCommittedCount": {}, + "TableSinkCommittedQPS": {}, + "TableSinkCommittedBytes": {}, + "TableSinkCommittedBytesPerSeconds": {} }, "finishTime": "", "errorMsg": null, @@ -795,9 +800,9 @@ seatunnel: } ``` -`jobId`, `jobName`, `jobStatus`, `createTime`, `jobDag`, `metrics` 字段总会返回. +`jobId`, `jobName`, `jobStatus`, `createTime`, `startTime`, `jobDag`, `metrics` 字段总会返回. `envOptions`, `pluginJarsUrls`, `isStartWithSavePoint` 字段在Job在RUNNING状态时会返回 -`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCEL +`finishTime`, `errorMsg` 字段在Job结束时会返回,结束状态为不为RUNNING,可能为FINISHED,可能为CANCELED 当我们查询不到这个Job时,返回结果只包含请求的 `jobId`: @@ -840,6 +845,7 @@ seatunnel: "jobStatus": "", "errorMsg": null, "createTime": "", + "startTime": "", "finishTime": "", "jobDag": { "jobId": "", @@ -945,8 +951,8 @@ seatunnel: > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | -> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`,需与 `restoreSourceJobId` 搭配使用。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | -> | restoreSourceJobId | optional | string | 设置了 `restoreMode` 时,用于指定需要恢复的作业 ID。若只设置了 `isStartWithSavePoint`(未设置 `restoreMode`),则回退使用 `jobId`。 | +> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | +> | restoreSourceJobId | optional | string | 要恢复的作业 ID,使用 `CHECKPOINT` 时必填。使用 `SAVEPOINT` 时,省略此参数则使用 `jobId`。 | > | format | optional | string | 配置风格,支持json、hocon 和 sql,默认 > json | **注意:** REST API 不支持 dry-run 功能。该功能仅通过 CLI 提供。 @@ -1083,8 +1089,8 @@ INSERT INTO console_sink SELECT * FROM fake_source; > | jobId | optional | string | job id > | > | jobName | optional | string | job name > | > | isStartWithSavePoint | optional | string | if job is started with save > point | -> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`,需与 `restoreSourceJobId` 搭配使用。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | -> | restoreSourceJobId | optional | string | 设置了 `restoreMode` 时,用于指定需要恢复的作业 ID。若只设置了 `isStartWithSavePoint`(未设置 `restoreMode`),则回退使用 `jobId`。 | +> | restoreMode | optional | string | 作业恢复的数据来源:`CHECKPOINT` 或 `SAVEPOINT`。详见 [作业恢复与重启](rest-api-job-lifecycle.md#6-作业恢复与重启)。 | +> | restoreSourceJobId | optional | string | 要恢复的作业 ID,使用 `CHECKPOINT` 时必填。使用 `SAVEPOINT` 时,省略此参数则使用 `jobId`。 | #### 请求体 上传文件key的名称是config_file,支持以下格式: @@ -1859,7 +1865,6 @@ Checkpoint 信息字段: } ] ``` - </details> #### 字段说明 diff --git a/docs/zh/engines/zeta/separated-cluster-deployment.md b/docs/zh/engines/zeta/separated-cluster-deployment.md index 7eba3b8ee0..6394bdf926 100644 --- a/docs/zh/engines/zeta/separated-cluster-deployment.md +++ b/docs/zh/engines/zeta/separated-cluster-deployment.md @@ -345,6 +345,46 @@ netty-common-4.1.89.Final.jar seatunnel-shade-hadoop3-uber-*.jar ``` +可以使用 S3 进行 IMap 持久化存储。 + +S3 的配置属性遵循 Hadoop S3A 文件系统(Native S3)标准。具体来说,我们使用 fs.s3a.access.key 和 fs.s3a.secret.key 属性,以确保与现有基于 Hadoop 的生态系统兼容。 + +如果您想使用 S3 兼容存储(例如 Minio),可以这样配置: + +```yaml +map: + engine*: + map-store: + enabled: true + initial-mode: EAGER + factory-class-name: org.apache.seatunnel.engine.server.persistence.FileMapStoreFactory + properties: + type: hdfs + namespace: /seatunnel/engine + clusterName: seatunnel + storage.type: s3 + s3.bucket: s3a://your-bucket + fs.defaultFS: s3a://your-bucket + fs.s3a.endpoint: http://your-minio-endpoint:port + fs.s3a.path.style.access: true + fs.s3a.access.key: YOUR_ACCESS_KEY + fs.s3a.secret.key: YOUR_SECRET_KEY + fs.s3a.aws.credentials.provider: org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider +``` + +注意:使用 S3 时,确保 lib 目录下有以下几个 jar。 + +以下两个 JAR 均来自 [Apache SeaTunnel Shade](https://github.com/apache/seatunnel-shade) 项目: +- `seatunnel-shade-hadoop3-uber` — 包重定位后的 shaded Hadoop 客户端 +- `seatunnel-shade-hadoop-aws` — 包重定位后的 shaded Hadoop AWS 连接器 + +版本号格式为 `${library.version}-${seatunnel.shade.version}`(例如 `3.1.4-3.0.0`),具体版本请参考 SeaTunnel 发行包中实际包含的 JAR 文件名。 + +``` +seatunnel-shade-hadoop3-uber-${seatunnel.shade.hadoop.version}-${seatunnel.shade.version}.jar +seatunnel-shade-hadoop-aws-${seatunnel.shade.hadoop-aws.version}-${seatunnel.shade.version}.jar +``` + 如果您使用 GCS,可以像这样配置: ```yaml @@ -424,8 +464,8 @@ seatunnel: ```yaml seatunnel: -engine: -job-metrics-partition-count: 4 + engine: + job-metrics-partition-count: 4 ``` 上述配置会将指标分布到 4 个分区中,而不是使用单个 key。 diff --git a/docs/zh/engines/zeta/telemetry.md b/docs/zh/engines/zeta/telemetry.md index e27b2afa91..8a13b5a6b1 100644 --- a/docs/zh/engines/zeta/telemetry.md +++ b/docs/zh/engines/zeta/telemetry.md @@ -35,7 +35,10 @@ seatunnel: Prometheus 的指标文本可通过 `http://{instanceHost}:5801/hazelcast/rest/instance/metrics` 获取。 -OpenMetrics 的指标文本可通过 `http://{instanceHost}:5801/hazelcast/rest/instance/openmetrics` 获取。 +OpenMetrics 的指标文本可通过 `http://{instanceHost}:8080/openmetrics` 获取。 + +Hazelcast REST API 也在 `http://{instanceHost}:5801/hazelcast/rest/instance/openmetrics` 提供 OpenMetrics。 +使用 Hazelcast 端点时,请在 `hazelcast.yaml` 中设置 `hazelcast.network.rest-api.enabled: true`。 可用的指标包括以下类别。 @@ -260,12 +263,13 @@ scrape_configs: # 默认分配给抓取指标的作业名称。 - job_name: 'seatunnel' scrape_interval: 5s - # 指标导出路径 - metrics_path: /hazelcast/rest/instance/metrics + # 指标导出路径(由 Jetty HTTP 服务器提供;仅当开启了 Hazelcast rest-api 时, + # 才使用 5801 端口上的 /hazelcast/rest/instance/metrics) + metrics_path: /metrics # 此作业静态配置的目标列表。 static_configs: # 静态配置中指定的目标。 - - targets: [ 'localhost:5801' ] + - targets: [ 'localhost:8080' ] # 为从目标抓取的所有指标分配的标签。 # labels: [<labelName>:<labelValue>] ``` diff --git a/docs/zh/engines/zeta/tuning-guide.md b/docs/zh/engines/zeta/tuning-guide.md index 27ceba1e9e..49ff2a6f6c 100644 --- a/docs/zh/engines/zeta/tuning-guide.md +++ b/docs/zh/engines/zeta/tuning-guide.md @@ -180,7 +180,7 @@ grep "SlowOperationDetector" "$SEATUNNEL_HOME"/logs/seatunnel-engine-*.log | tai 将时间戳与以下事件关联: - 作业提交事件(REST API 调用) -- Checkpoint 间隔(引擎默认值为 300000 毫秒;发行包的 `config/seatunnel.yaml` 模板中配置为 `checkpoint.interval: 10000`) +- Checkpoint 间隔(`seatunnel.engine.checkpoint.interval`):代码默认值为 300000 毫秒(5 分钟),发行包中的 `config/seatunnel.yaml` 设置为 10000 毫秒。 - 高负载时段(数据摄入高峰期) #### 第二步:检查节点整体健康状态 @@ -405,6 +405,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 namespace: /seatunnel/checkpoint/ s3.bucket: s3a://<your-bucket> fs.s3a.endpoint: s3.<region>.amazonaws.com @@ -418,6 +419,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 fs.s3a.fast.upload: true s3.bucket: s3a://<your-bucket> fs.s3a.fast.upload.buffer: disk @@ -433,6 +435,7 @@ seatunnel: storage: type: hdfs plugin-config: + storage.type: s3 fs.s3a.attempts.maximum: 10 s3.bucket: s3a://<your-bucket> fs.s3a.connection.timeout: 30000 diff --git a/docs/zh/engines/zeta/user-command.md b/docs/zh/engines/zeta/user-command.md index eaf3847cae..3fd117804b 100644 --- a/docs/zh/engines/zeta/user-command.md +++ b/docs/zh/engines/zeta/user-command.md @@ -4,7 +4,7 @@ sidebar_position: 13 # 客户端命令行工具 -SeaTunnel Engine 提供了一个命令行工具,用于管理 SeaTunnel Engine 的作业。您可以使用命令行工具提交、停止、暂停、恢复、删除作业,查看作业状态和监控指标等。 +SeaTunnel Engine 提供了一个命令行工具,用于管理 SeaTunnel Engine 的作业。您可以使用命令行工具提交、停止、savepoint、恢复作业,查看作业状态和监控指标等。(目前没有专门的删除作业命令;已结束的作业记录会在 `history-job-expire-minutes` 到期后被自动清除。) 可以通过如下命令获取命令行工具的帮助信息:
