You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/28 08:57:32 UTC

[GitHub] [incubator-seatunnel] Mr-LiuXu opened a new pull request, #3218: [Feature][Doc] Improved connectors v2 contribution guide

Mr-LiuXu opened a new pull request, #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218

   <!--
   
   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/incubator-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`.
   
   -->
   ..was encountered
   https://github.com/apache/incubator-seatunnel/issues/2541
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
     Improve the connector-v2 contribution guide and add common basic modules and formats to help new developers enter development more quickly
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [x] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#discussion_r1007849754


##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation
+-  ../`seatunnel-translation`                                          translation layer for the new connector 

Review Comment:
   ```suggestion
   -  ../`seatunnel-translation`                                          translation layer for the connector-v2
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation
+-  ../`seatunnel-translation`                                          translation layer for the new connector 
+-  ../seatunnel-e2e/`seatunnel-flink-connector-v2-e2e`                 testcase running on flink
+-  ../seatunnel-e2e/`seatunnel-spark-connector-v2-e2e`                 testcase running on spark
+-  ../seatunnel-examples/`seatunnel-flink-connector-v2-example`        flink local running instance
+-  ../seatunnel-examples/`seatunnel-spark-connector-v2-example`        spark local running instance

Review Comment:
   ```suggestion
   -  ../seatunnel-examples/`seatunnel-spark-connector-v2-example`        seatunnel connector-v2 example use spark local running instance
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -22,13 +31,27 @@ configuration files used in example are saved in the "resources/examples" folder
 own connectors, you need to follow the steps below.
 
 1. Add the groupId, artifactId and version of the connector to be tested to
-   seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
-   seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml when you want to runs it in Spark engine) as a
+   `seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml`(or add it to
+   `seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml` when you want to runs it in Spark engine) as a
    dependency.
 2. Find the dependency in your connector pom file which scope is test or provided and then add them to
    seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
    seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml) file and modify the scope to compile.
-3. Refer to the SeaTunnelApiExample class to develop your sample code.
+3. Add the task configuration file under resources/examples.
+4. Configure the file in the `SeaTunnelApiExample` main method.
+5. Just run the main method.
+
+### **Create the format of the connector**

Review Comment:
   ```suggestion
   ### **Create new seatunnel v2 connector**
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -22,13 +31,27 @@ configuration files used in example are saved in the "resources/examples" folder
 own connectors, you need to follow the steps below.
 
 1. Add the groupId, artifactId and version of the connector to be tested to
-   seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
-   seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml when you want to runs it in Spark engine) as a
+   `seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml`(or add it to
+   `seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml` when you want to runs it in Spark engine) as a
    dependency.
 2. Find the dependency in your connector pom file which scope is test or provided and then add them to
    seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
    seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml) file and modify the scope to compile.
-3. Refer to the SeaTunnelApiExample class to develop your sample code.
+3. Add the task configuration file under resources/examples.
+4. Configure the file in the `SeaTunnelApiExample` main method.
+5. Just run the main method.
+
+### **Create the format of the connector**
+
+1.Create a new module under the `seatunnel-connectors-v2` directory and name it connector - {connector name}.
+
+2.The pom file can refer to the pom file of the existing connector, and add the current sub model to the pom file of the parent model
+
+3.Create two packages corresponding to source and sink
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.source
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.sink

Review Comment:
   Not only this, also should add doc about:
   1. add connector to plugin-mapping file
   2. add connector to `seatunnel-dist/pom.xml`



##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation
+-  ../`seatunnel-translation`                                          translation layer for the new connector 
+-  ../seatunnel-e2e/`seatunnel-flink-connector-v2-e2e`                 testcase running on flink

Review Comment:
   ```suggestion
   -  ../seatunnel-e2e/`seatunnel-flink-connector-v2-e2e`                 end to end testcase running on flink
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation
+-  ../`seatunnel-translation`                                          translation layer for the new connector 
+-  ../seatunnel-e2e/`seatunnel-flink-connector-v2-e2e`                 testcase running on flink
+-  ../seatunnel-e2e/`seatunnel-spark-connector-v2-e2e`                 testcase running on spark

Review Comment:
   ```suggestion
   -  ../seatunnel-e2e/`seatunnel-spark-connector-v2-e2e`                 end to end testcase running on spark
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation
+-  ../`seatunnel-translation`                                          translation layer for the new connector 
+-  ../seatunnel-e2e/`seatunnel-flink-connector-v2-e2e`                 testcase running on flink
+-  ../seatunnel-e2e/`seatunnel-spark-connector-v2-e2e`                 testcase running on spark
+-  ../seatunnel-examples/`seatunnel-flink-connector-v2-example`        flink local running instance

Review Comment:
   ```suggestion
   -  ../seatunnel-examples/`seatunnel-flink-connector-v2-example`        seatunnel connector-v2 example use flink local running instance
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -10,6 +10,15 @@ this [issue](https://github.com/apache/incubator-seatunnel/issues/1608) for deta
 In order to separate from the old code, we have defined new modules for execution flow. This facilitates parallel
 development at the current stage, and reduces the difficulty of merging.
 
+### engineering structure
+
+-  ../`seatunnel-connectors-v2`                                        connector code implementation

Review Comment:
   ```suggestion
   -  ../`seatunnel-connectors-v2`                                        connector-v2 code implementation
   ```



-- 
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


[GitHub] [incubator-seatunnel] Mr-LiuXu commented on pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Mr-LiuXu commented on PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#issuecomment-1296233096

   I have improved the document, can you take a look.


-- 
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


[GitHub] [incubator-seatunnel] Mr-LiuXu commented on pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Mr-LiuXu commented on PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#issuecomment-1295772391

   I have improved the document, can you take a look.


-- 
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


[GitHub] [incubator-seatunnel] Mr-LiuXu commented on a diff in pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Mr-LiuXu commented on code in PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#discussion_r1008611267


##########
seatunnel-connectors-v2/README.md:
##########
@@ -22,13 +31,27 @@ configuration files used in example are saved in the "resources/examples" folder
 own connectors, you need to follow the steps below.
 
 1. Add the groupId, artifactId and version of the connector to be tested to
-   seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
-   seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml when you want to runs it in Spark engine) as a
+   `seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml`(or add it to
+   `seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml` when you want to runs it in Spark engine) as a
    dependency.
 2. Find the dependency in your connector pom file which scope is test or provided and then add them to
    seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
    seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml) file and modify the scope to compile.
-3. Refer to the SeaTunnelApiExample class to develop your sample code.
+3. Add the task configuration file under resources/examples.
+4. Configure the file in the `SeaTunnelApiExample` main method.
+5. Just run the main method.
+
+### **Create the format of the connector**
+
+1.Create a new module under the `seatunnel-connectors-v2` directory and name it connector - {connector name}.
+
+2.The pom file can refer to the pom file of the existing connector, and add the current sub model to the pom file of the parent model
+
+3.Create two packages corresponding to source and sink
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.source
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.sink

Review Comment:
   OK, I'll revise it later



-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#discussion_r1008984564


##########
seatunnel-connectors-v2/README.zh.md:
##########
@@ -18,7 +27,25 @@ SeaTunnel为与计算引擎进行解耦,设计了新的连接器API,通过
    version.(或者当你想在spark引擎运行时在`seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml`添加依赖)
 2. 如果你的connector中存在scope为test或provided的依赖,将这些依赖添加到seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(
    或者在seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml)中,并且修改scope为compile.
-3. 参考`SeaTunnelApiExample`开发自己的案例程序。
+3. 在resources/examples下添加任务配置文件.
+4. 在`SeaTunnelApiExample` main方法中配置文件.
+5. 运行main方法即可.
+
+### 创建新的seatunnel v2 connector
+
+1.在`seatunnel-connectors-v2`目录下新建一个module,命名为connector-{连接器名}.
+
+2.pom文件可以参考已有连接器的pom文件,并在父model的pom文件中添加当前子model.
+
+3.新建两个package分别对应source和sink
+
+​       package org.apache.seatunnel.connectors.seatunnel.{连接器名}.source
+
+​       package org.apache.seatunnel.connectors.seatunnel.{连接器名}.sink
+
+4.将连接器添加到plugin-mapping文件.

Review Comment:
   ```suggestion
   4.将连接器信息添加到在项目根目录的plugin-mapping.properties文件中.
   ```



-- 
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


[GitHub] [incubator-seatunnel] EricJoy2048 merged pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
EricJoy2048 merged PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218


-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#discussion_r1008780471


##########
seatunnel-connectors-v2/README.md:
##########
@@ -22,13 +31,31 @@ configuration files used in example are saved in the "resources/examples" folder
 own connectors, you need to follow the steps below.
 
 1. Add the groupId, artifactId and version of the connector to be tested to
-   seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
-   seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml when you want to runs it in Spark engine) as a
+   `seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml`(or add it to
+   `seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml` when you want to runs it in Spark engine) as a
    dependency.
 2. Find the dependency in your connector pom file which scope is test or provided and then add them to
    seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
    seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml) file and modify the scope to compile.
-3. Refer to the SeaTunnelApiExample class to develop your sample code.
+3. Add the task configuration file under resources/examples.
+4. Configure the file in the `SeaTunnelApiExample` main method.
+5. Just run the main method.
+
+### **Create new seatunnel v2 connector**
+
+1.Create a new module under the `seatunnel-connectors-v2` directory and name it connector - {connector name}.
+
+2.The pom file can refer to the pom file of the existing connector, and add the current sub model to the pom file of the parent model
+
+3.Create two packages corresponding to source and sink
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.source
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.sink
+
+4.add connector to plugin-mapping file.

Review Comment:
   ```suggestion
   4.add connector info to plugin-mapping.properties file in seatunnel root path.
   ```



##########
seatunnel-connectors-v2/README.md:
##########
@@ -22,13 +31,31 @@ configuration files used in example are saved in the "resources/examples" folder
 own connectors, you need to follow the steps below.
 
 1. Add the groupId, artifactId and version of the connector to be tested to
-   seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
-   seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml when you want to runs it in Spark engine) as a
+   `seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml`(or add it to
+   `seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml` when you want to runs it in Spark engine) as a
    dependency.
 2. Find the dependency in your connector pom file which scope is test or provided and then add them to
    seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml(or add it to
    seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml) file and modify the scope to compile.
-3. Refer to the SeaTunnelApiExample class to develop your sample code.
+3. Add the task configuration file under resources/examples.
+4. Configure the file in the `SeaTunnelApiExample` main method.
+5. Just run the main method.
+
+### **Create new seatunnel v2 connector**
+
+1.Create a new module under the `seatunnel-connectors-v2` directory and name it connector - {connector name}.
+
+2.The pom file can refer to the pom file of the existing connector, and add the current sub model to the pom file of the parent model
+
+3.Create two packages corresponding to source and sink
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.source
+
+​    package org.apache.seatunnel.connectors.seatunnel.{connector name}}.sink
+
+4.add connector to plugin-mapping file.
+
+5.add connector to seatunnel-dist/pom.xml.

Review Comment:
   ```suggestion
   5.add connector dependency to seatunnel-dist/pom.xml, so the connector jar can be find in binary package .
   ```



-- 
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


[GitHub] [incubator-seatunnel] Mr-LiuXu commented on pull request #3218: [Feature][Doc] Improved connectors v2 contribution guide

Posted by GitBox <gi...@apache.org>.
Mr-LiuXu commented on PR #3218:
URL: https://github.com/apache/incubator-seatunnel/pull/3218#issuecomment-1294734144

   I have improved some details and debugging steps on the contribution guide of seatunnel-connectors-v2 and added some common basic modules, formats, etc. Can you take a look?


-- 
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