SEPURI-SAI-KRISHNA opened a new pull request, #13115:
URL: https://github.com/apache/seatunnel/pull/13115
Yes, glad to contribute to Apache SeaTunnel.
### Purpose of this pull request
Fixes #13114.
On Flink, sinks did not load jars from
`${SEATUNNEL_HOME}/plugins/connector-xxx/`. #9650 added per-connector plugin
directories and moved the Flink source processor to
`getPluginJarAndDependencyPaths`, but both Flink sink processors kept
`getPluginJarPaths`, which returns only the connector jar. This PR moves them
to `getPluginJarAndDependencyPaths`, as the Flink source, the Spark starter and
Zeta already do.
Changes:
- `AbstractSinkExecuteProcessor` (Flink 1.15 to 1.20) and the Flink 1.13
`SinkExecuteProcessor`: one line each.
- `SinkExecuteProcessorTest` in both starters.
- `seatunnel-flink-13-starter/pom.xml`: adds `junit-platform-launcher` in
test scope, as `seatunnel-flink-starter-common` already has. Without it no test
in that module starts (`NoClassDefFoundError:
org/junit/platform/launcher/core/LauncherFactory`).
### Does this PR introduce _any_ user-facing change?
Yes. On Flink, a sink's jars in `plugins/connector-xxx/` are now loaded, as
`connector-isolated-dependency.md` already says. The other jars the method
returns (jars directly in `plugins/` and in directories not named
`connector-*`) were already added for every job through the source, so no other
jar is added.
### How was this patch tested?
- `SinkExecuteProcessorTest` (one in each starter) builds a temporary
`SEATUNNEL_HOME` with `connectors/connector-demo.jar`,
`plugins/connector-demo/demo-client.jar` and
`plugins/connector-other/other-client.jar`, creates the sink processor and
checks that its jar list holds the first two and not the third. Both tests fail
on `dev`, where the list holds only `connector-demo.jar`, and pass with this
change.
- `./mvnw verify -am` on JDK 17 for `seatunnel-flink-starter-common` and
`seatunnel-flink-13-starter`: spotless passes, tests pass (6 and 1).
- End to end: a JMS sink I am building for #13078 keeps its client jars in
`plugins/connector-jms/`. Its E2E sink test failed on Flink 1.13.6, 1.15.3,
1.18.0 and 1.20.1 with the client class not found, and passed on all four with
this change. It passes on Zeta and on Spark 2.4.6 and 3.3.0 without it.
### Check list
* [x] 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/developer/new-license.md)
(no new jar)
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs (the docs already
describe this behavior)
* [x] If necessary, please update `incompatible-changes.md` to describe the
incompatibility caused by this PR. (not needed)
--
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]