TyrantLucifer commented on code in PR #2800:
URL:
https://github.com/apache/incubator-seatunnel/pull/2800#discussion_r975552392
##########
seatunnel-connectors-v2/README.zh.md:
##########
@@ -1,11 +1,11 @@
## 目的
-Because SeaTunnel design new API for connectors,
所以通过这篇文章来介绍新的接口以及新的代码结构,方便开发者快速的帮助新API和翻译层完善,以及开发出新的Connecotor.
+因为SeaTunnel
为connectors设计了新的API,所以通过这篇文章来介绍新的接口以及新的代码结构,方便开发者快速的帮助新API和翻译层完善,以及开发出新的Connector.
## 代码结构
-现阶段所有相关代码保存在`api-draft`分支上。
为了和老的代码分开,方便现阶段的并行开发,以及降低merge的难度。我们为新的执行流程定义了新的模块
### Example
我们已经在`seatunnel-examples`中准备好了新版本的可本地执行Example程序,直接调用`seatunnel-flink-connector-v2-example`或`seatunnel-spark-connector-v2-example`中的`SeaTunnelApiExample`即可。这也是本地开发Connector经常会用到的调试方式。
-对应的配置文件保存在同模块的`resources/examples`文件夹下,和以前一样。
+对应的配置文件保存在同模块的`resources/examples`文件夹下,和以前一样。目前测试需要将connector依赖进来,如果有部分第三方包需要自行依赖请使用类加载器自行加载,如果有些
Scope为 Provided的依赖,需要在Intellij IDEAZ中单击 "Run"->"Edit configurations...",在
Review Comment:
目前在Example模块下测试需要把对应连接器的依赖添加到pom文件中,如果有部分三方依赖请自行添加至模块classpath,如果连接器的某些依赖的`scope`为`provided`,则还需要在Intellij
IDEA中设置`Include dependencies with Provided Scope`
##########
seatunnel-connectors-v2/README.md:
##########
@@ -79,6 +80,6 @@ It is used to process ``SinkWriter.prepareCommit`` the
returned data information
In the current version, it is recommended to implement
``SinkAggregatedCommitter`` as the first choice, which can provide strong
consistency guarantee in Flink/Spark. At the same time, commit should be
idempotent, and save engine retry can work normally.
Review Comment:
SeaTunnel has designed a new connector API to decouple from the compute
engine. This article introduces the new interface and the new code structure to
help developers quickly get started with the new API and understand the
principles of the new API.
##########
seatunnel-connectors-v2/README.zh.md:
##########
@@ -61,4 +61,4 @@ if (Boundedness.BOUNDED.equals(context.getBoundedness())) {
#### 我应该实现SinkCommitter还是SinkAggregatedCommitter?
当前版本推荐将实现SinkAggregatedCommitter作为首选,可以在Flink/Spark中提供较强的一致性保证,同时commit应该要实现幂等性,保存引擎重试能够正常运作。
## 实现
-所有的Connector实现都应该在`seatunnel-connectors/seatunnel-connectors-seatuunel`模块下,现阶段可参考的示例均在此模块下。
\ No newline at end of file
+所有的Connector实现都应该在`seatunnel-connectors-v2`模块下,现阶段可参考的示例均在此模块下。
Review Comment:
现阶段所有的连接器实现及可参考的示例都在`seatunnel-connectors-v2`下,用户可自行查阅参考
##########
seatunnel-connectors-v2/README.zh.md:
##########
@@ -1,11 +1,11 @@
## 目的
-Because SeaTunnel design new API for connectors,
所以通过这篇文章来介绍新的接口以及新的代码结构,方便开发者快速的帮助新API和翻译层完善,以及开发出新的Connecotor.
+因为SeaTunnel
为connectors设计了新的API,所以通过这篇文章来介绍新的接口以及新的代码结构,方便开发者快速的帮助新API和翻译层完善,以及开发出新的Connector.
Review Comment:
SeaTunnel为与计算引擎进行解耦,设计了新的连接器API,通过这篇文章来介绍新的接口以及新的代码结构,方便开发者快速上手使用新版API开发连接器并理解新版API运行原理
##########
seatunnel-connectors-v2/README.md:
##########
@@ -2,10 +2,11 @@
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.
+For now, the test needs to rely on the Connector,if your test must use a
third-party jar and the Scope is Provided,you need to check "Include
dependencies with 'Provided Scope" and choose current Project in "Run"->"Edit
configurations..."->"Use classpath of module" .
Review Comment:
Currently, 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.
--
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]