joyCurry30 commented on code in PR #4006:
URL: https://github.com/apache/flink-cdc/pull/4006#discussion_r2065689400


##########
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:
   Would it be possible to use Java reflection in the test to obtain this 
object, instead of creating a separate method for it?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to