EricJoy2048 commented on code in PR #2800: URL: https://github.com/apache/incubator-seatunnel/pull/2800#discussion_r979215481
########## seatunnel-connectors-v2/README.md: ########## @@ -1,48 +1,101 @@ # Purpose -This article introduces the new interface and the new code structure on account of the newly designed API for Connectors in Apache SeaTunnel. This helps developers with quick overview regarding API, translation layer improvement, and development of new Connector. + +This article introduces the new interface and the new code structure on account of the newly designed API for Connectors +in Apache SeaTunnel. This helps developers with quick overview regarding API, translation layer improvement, and +development of new Connector. ## **Code Structure** -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. All the relevant code at this stage is kept on the ``api-draft`` branch. + +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. ### **Example** -We have prepared a new version of the locally executable example program in ``seatunnel-examples``, which can be directly called using ``seatunnel-flink-connector-v2-example`` or ``seatunnel-spark-connector-v2-example`` in ``SeaTunnelApiExample``. This is also the debugging method that is often used in the local development of Connector. The corresponding configuration files are saved in the same module ``resources/examples`` folder as before. +We have prepared a new version of the locally executable example program in ``seatunnel-examples``, which can be +directly called using ``seatunnel-flink-connector-v2-example`` or ``seatunnel-spark-connector-v2-example`` +in ``SeaTunnelApiExample``. This is also the debugging method that is often used in the local development of Connector. +The corresponding configuration files are saved in the same module ``resources/examples`` folder as before. Currently, +you need to add the dependencies of the corresponding connectors to the pom file for testing under the Review Comment: > you need to add the dependencies of the corresponding connectors to the pom file for testing under the seatunnel-examples module, if there are some three-party dependencies, please add them to the module classpath by yourself, if the scope of some dependencies of the connectors is provided, you also need to set Include dependencies with Provided Scope in Intellij IDEA. I think these are guidelines for contributors on how to add examples to their connectors. This requires clearer steps. **If you want to add examples for your 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 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. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
