-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Improve][seatunnel-examples][seatunnel-engine-examples] Add a usage example of embedding the zeta engine as a plugin in project #10272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
example of embedding the zeta engine as a plugin in project
| import java.util.stream.Stream; | ||
| import java.util.stream.StreamSupport; | ||
|
|
||
| /** 将SeaTunnel引擎当作工具的方式嵌入到项目中使用 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a Apache Project, please describe it in English, thx
|
@davidzollo I have translated the Chinese description into English. Do I need to close this PR and then submit a new one instead? |
| System.err.println("jobError: " + jobResult.getError()); | ||
|
|
||
| Map<String, Object> jobMetricsSummary = server.getJobMetricsSummary(jobId); | ||
| System.err.println("------------jobMetricsSummary-------------"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use log
|
Are there many such usage scenarios? Why isn't connecting with REST supported? |
| return JobMetricsParser.getJobMetrics(jobMetrics); | ||
| } | ||
|
|
||
| public static class JobMetricsParser { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this class needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SeaTunnel is a comprehensive software. However, in actual projects, the requirements I encountered were that some functions needed to achieve data transmission between different databases and collect data transmission indicators at the same time. I focused on researching DataX and SeaTunnel and found that SeaTunnel is relatively easy to be introduced into the project as a maven dependency and used as a tool rather than as a complete application, which is highly consistent with my requirements. I carefully reviewed the official documentation, drew on the implementation method of the rest api, wrote this sample code and confirmed that it was indeed feasible. Since I hadn't found similar usage experiences on the Internet before, I also asked large models like deepseek and Doubao, but still didn't get satisfactory answers. I think perhaps others might also encounter similar usage scenarios. Since I have found a feasible solution, I hope it can offer some reference to others

Purpose of this pull request
Add a usage example of embedding the zeta engine as a plugin in project
Does this PR introduce any user-facing change?
No
How was this patch tested?
Check list
New License Guide
incompatible-changes.mdto describe the incompatibility caused by this PR.