You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "iamadamnBoy (via GitHub)" <gi...@apache.org> on 2025/01/12 17:12:18 UTC
[PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
iamadamnBoy opened a new pull request, #8505:
URL: https://github.com/apache/seatunnel/pull/8505
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
### Purpose of this pull request
I translated two files, namely `docs/zh/connector-v2/source/Mysql.md` and `docs/zh/other-engine/spark.md`, and corrected the error in the table ('Data Type Mapping') and column ('DECIMAL UNSIGNED') in `docs/en/connector-v2/source/Mysql.md`.
<!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
### Does this PR introduce _any_ user-facing change?
documentation fix and translate
used to be:

and now:

I deleted an unnecessary parentheses.
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released SeaTunnel versions or within the unreleased branches such as dev.
If no, write 'No'.
If you are adding/modifying connector documents, please follow our new specifications: https://github.com/apache/seatunnel/issues/4544.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
If you are adding E2E test cases, maybe refer to https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mysql-e2e/src/test/resources/mysqlcdc_to_mysql.conf, here is a good example.
-->
### Check list
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If you are contributing the connector code, please check that the following files are updated:
1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
* [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
Posted by "iamadamnBoy (via GitHub)" <gi...@apache.org>.
iamadamnBoy commented on PR #8505:
URL: https://github.com/apache/seatunnel/pull/8505#issuecomment-2591782289
fixed already
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #8505:
URL: https://github.com/apache/seatunnel/pull/8505#discussion_r1914278656
##########
docs/zh/other-engine/spark.md:
##########
@@ -0,0 +1,109 @@
+# SeaTunnel 通过 Spark 引擎运行
+
+Spark 是一个强大的高性能分布式计算处理引擎。有关它的更多信息,您可以搜索"Apache Spark"
+
+
+### 如何在作业中设置 Spark 配置信息
+
+例:
+我为某项工作设置了一些 spark 配置项
+
+```
+env {
+ spark.app.name = "example"
+ spark.sql.catalogImplementation = "hive"
+ spark.executor.memory= "2g"
+ spark.executor.instances = "2"
+ spark.yarn.priority = "100'
+ hive.exec.dynamic.partition.mode = "nonstrict"
+ spark.dynamicAllocation.enabled="false"
+}
+```
+
+### 命令行示例
+
+#### Spark on Yarn集群
+
+```
+./bin/start-seatunnel-spark-3-connector-v2.sh --master yarn --deploy-mode cluster --config config/example.conf
+```
+
+#### Spark on Yarn集群
+
+```
+./bin/start-seatunnel-spark-3-connector-v2.sh --master yarn --deploy-mode client --config config/example.conf
+```
+
+### 如何设置简单的 Spark 作业
+
+这是通过 Spark 运行的一个简单作业。会将随机生成的数据输出到控制台
+
+```
+env {
+ # common parameter
+ parallelism = 1
+
+ # spark special parameter
+ spark.app.name = "example"
+ spark.sql.catalogImplementation = "hive"
+ spark.executor.memory= "2g"
+ spark.executor.instances = "1"
+ spark.yarn.priority = "100"
+ hive.exec.dynamic.partition.mode = "nonstrict"
+ spark.dynamicAllocation.enabled="false"
+}
+
+source {
+ FakeSource {
+ schema = {
+ fields {
+ c_map = "map<string, array<int>>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_decimal = "decimal(30, 8)"
+ c_null = "null"
+ c_bytes = bytes
+ c_date = date
+ c_timestamp = timestamp
+ c_row = {
+ c_map = "map<string, map<string, string>>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_decimal = "decimal(30, 8)"
+ c_null = "null"
+ c_bytes = bytes
+ c_date = date
+ c_timestamp = timestamp
+ }
+ }
+ }
+}
+}
+
+transform {
+ # 如果您想获取有关如何配置 seatunnel 的更多信息并查看转换插件的完整列表,
+ # 请访问 https://seatunnel.apache.org/docs/transform-v2/sql
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #8505:
URL: https://github.com/apache/seatunnel/pull/8505#issuecomment-2591690543
Please fix ci @iamadamnBoy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #8505:
URL: https://github.com/apache/seatunnel/pull/8505#discussion_r1915912361
##########
docs/zh/connector-v2/source/Mysql.md:
##########
@@ -0,0 +1,314 @@
+# MySQL
+
+> JDBC Mysql 源连接器
+
+## 描述
+
+通过 JDBC 读取外部数据源数据。
+
+## 支持 Mysql 版本
+
+- 5.5/5.6/5.7/8.0/8.1/8.2/8.3/8.4
+
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## 需要的依赖项
+
+### 对于 Spark/Flink 引擎
+
+> 1. 您需要确保 [jdbc 驱动程序 jar 包](https://mvnrepository.com/artifact/mysql/mysql-connector-java) 已放置在目录 `${SEATUNNEL_HOME}/plugins/` 中。
+
+### 对于 SeaTunnel Zeta 引擎
+
+> 1. 您需要确保 [jdbc 驱动程序 jar 包](https://mvnrepository.com/artifact/mysql/mysql-connector-java) 已放置在目录 `${SEATUNNEL_HOME}/lib/` 中。
+
+## 主要功能
+
+- [x] [批处理](../../concept/connector-v2-features.md)
+- [ ] [流处理](../../concept/connector-v2-features.md)
+- [x] [精确一次](../../concept/connector-v2-features.md)
+- [x] [列投影](../../concept/connector-v2-features.md)
+- [x] [并行度](../../concept/connector-v2-features.md)
+- [x] [支持用户定义的拆分](../../concept/connector-v2-features.md)
+- [x] [支持多表读取](../../concept/connector-v2-features.md)
+
+> 支持 SQL 查询,并能实现列投影效果
+
+## 支持的数据源信息
+
+| 数据源 | 支持的版本 | 驱动器 | 网址 | Maven下载链接 |
+|-----|---------------------------------------------------------|--------------------------|---------------------------------------|---------------------------------------------------------------------|
+| Mysql | 不同的依赖版本具有不同的驱动程序类。 | com.mysql.cj.jdbc.Driver | jdbc:mysql://localhost:3306:3306/test | [下载](https://mvnrepository.com/artifact/mysql/mysql-connector-java) |
+
+## 数据类型映射
+
+| Mysql 数据类型 | SeaTunnel 数据类型 |
+|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
+| BIT(1)<br/>TINYINT(1) | BOOLEAN |
+| TINYINT | BYTE |
+| TINYINT UNSIGNED<br/>SMALLINT | SMALLINT |
+| SMALLINT UNSIGNED<br/>MEDIUMINT<br/>MEDIUMINT UNSIGNED<br/>INT<br/>INTEGER<br/>YEAR | INT |
+| INT UNSIGNED<br/>INTEGER UNSIGNED<br/>BIGINT | BIGINT |
+| BIGINT UNSIGNED | DECIMAL(20,0) |
+| DECIMAL(x,y)(获取指定列的列大小<38) | DECIMAL(x,y) |
+| DECIMAL(x,y)(获取指定列的列大小>38) | DECIMAL(38,18) |
+| DECIMAL UNSIGNED | DECIMAL((获取指定列的列大小)+1,<br/>(获取指定列的小数点右侧的位数)) |
+| FLOAT<br/>FLOAT UNSIGNED | FLOAT |
+| DOUBLE<br/>DOUBLE UNSIGNED | DOUBLE |
+| CHAR<br/>VARCHAR<br/>TINYTEXT<br/>MEDIUMTEXT<br/>TEXT<br/>LONGTEXT<br/>JSON<br/>ENUM | STRING |
+| DATE | DATE |
+| TIME(s) | TIME(s) |
+| DATETIME<br/>TIMESTAMP(s) | TIMESTAMP(s) |
+| TINYBLOB<br/>MEDIUMBLOB<br/>BLOB<br/>LONGBLOB<br/>BINARY<br/>VARBINAR<br/>BIT(n)<br/>GEOMETRY | BYTES |
+
+## 数据源参数
+
+| 名称 | 类型 | 是否必填 | 默认值 | 描述 |
+|--------------------------------------------|------------|------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url | String | 是 | - | JDBC 连接的 URL。参见一个示例: <br>`jdbc:mysql://localhost:3306:3306/test`。 |
Review Comment:
```suggestion
| url | String | 是 | - | JDBC 连接的 URL。参见示例: <br>`jdbc:mysql://localhost:3306:3306/test`。 |
```
##########
docs/zh/other-engine/spark.md:
##########
@@ -0,0 +1,107 @@
+# SeaTunnel 通过 Spark 引擎运行
+
+Spark 是一个强大的高性能分布式计算处理引擎。有关它的更多信息,您可以搜索"Apache Spark"
+
+
+### 如何在作业中设置 Spark 配置信息
+
+例:
+我为某项工作设置了一些 spark 配置项
Review Comment:
```suggestion
我为这个任务设置了一些 spark 配置项
```
##########
docs/zh/other-engine/spark.md:
##########
@@ -0,0 +1,107 @@
+# SeaTunnel 通过 Spark 引擎运行
+
+Spark 是一个强大的高性能分布式计算处理引擎。有关它的更多信息,您可以搜索"Apache Spark"
+
+
+### 如何在作业中设置 Spark 配置信息
+
+例:
+我为某项工作设置了一些 spark 配置项
+
+```
+env {
+ spark.app.name = "example"
+ spark.sql.catalogImplementation = "hive"
+ spark.executor.memory= "2g"
+ spark.executor.instances = "2"
+ spark.yarn.priority = "100'
+ hive.exec.dynamic.partition.mode = "nonstrict"
+ spark.dynamicAllocation.enabled="false"
+}
+```
+
+### 命令行示例
+
+#### Spark on Yarn集群
+
+```
+./bin/start-seatunnel-spark-3-connector-v2.sh --master yarn --deploy-mode cluster --config config/example.conf
+```
+
+#### Spark on Yarn集群
+
+```
+./bin/start-seatunnel-spark-3-connector-v2.sh --master yarn --deploy-mode client --config config/example.conf
+```
+
+### 如何设置简单的 Spark 作业
+
+这是通过 Spark 运行的一个简单作业。会将随机生成的数据输出到控制台
+
+```
+env {
+ # common parameter
+ parallelism = 1
+
+ # spark special parameter
+ spark.app.name = "example"
+ spark.sql.catalogImplementation = "hive"
+ spark.executor.memory= "2g"
+ spark.executor.instances = "1"
+ spark.yarn.priority = "100"
+ hive.exec.dynamic.partition.mode = "nonstrict"
+ spark.dynamicAllocation.enabled="false"
+}
+
+source {
+ FakeSource {
+ schema = {
+ fields {
+ c_map = "map<string, array<int>>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_decimal = "decimal(30, 8)"
+ c_null = "null"
+ c_bytes = bytes
+ c_date = date
+ c_timestamp = timestamp
+ c_row = {
+ c_map = "map<string, map<string, string>>"
+ c_array = "array<int>"
+ c_string = string
+ c_boolean = boolean
+ c_tinyint = tinyint
+ c_smallint = smallint
+ c_int = int
+ c_bigint = bigint
+ c_float = float
+ c_double = double
+ c_decimal = "decimal(30, 8)"
+ c_null = "null"
+ c_bytes = bytes
+ c_date = date
+ c_timestamp = timestamp
+ }
+ }
+ }
+}
+}
+
+transform {
+}
+
+sink{
+ Console{}
+}
+```
+
+### 如何在项目中运行作业
+
+将代码拉取到本地后,进入 seatunnel-examples/seatunnel-spark-connector-v2-example 模块,找到 org.apache.seatunnel.example.spark.v2.SeaTunnelApiExample 来完成作业的操作。
Review Comment:
```suggestion
将代码拉取到本地后,进入 seatunnel-examples/seatunnel-spark-connector-v2-example 模块,找到 org.apache.seatunnel.example.spark.v2.SeaTunnelApiExample 来完成作业的运行。
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Doc][Translate] translated and corrected the error in the original document [seatunnel]
Posted by "wuchunfu (via GitHub)" <gi...@apache.org>.
wuchunfu merged PR #8505:
URL: https://github.com/apache/seatunnel/pull/8505
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org