MOBIN-F commented on code in PR #4006:
URL: https://github.com/apache/flink-cdc/pull/4006#discussion_r2065903217
##########
flink-cdc-composer/src/main/java/org/apache/flink/cdc/composer/flink/FlinkPipelineComposer.java:
##########
@@ -254,4 +251,27 @@ private Optional<URL> getContainingJar(Class<?> clazz)
throws Exception {
}
return Optional.of(container);
}
+
+ private static void addAdditionalJars(
+ StreamExecutionEnvironment env, List<Path> additionalJars) {
+ additionalJars.forEach(
+ jarPath -> {
+ try {
+ FlinkEnvironmentUtils.addJar(
+ env,
+
jarPath.makeQualified(jarPath.getFileSystem()).toUri().toURL());
+ } catch (Exception e) {
+ throw new RuntimeException(
+ String.format(
+ "Unable to convert JAR path \"%s\" to
URL when adding JAR to Flink environment",
+ jarPath),
+ e);
+ }
+ });
+ }
+
+ @VisibleForTesting
+ public StreamExecutionEnvironment getEnv() {
+ return env;
+ }
Review Comment:
Reflection makes code difficult to maintain
--
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]