loserwang1024 opened a new pull request, #3301:
URL: https://github.com/apache/flink-cdc/pull/3301

   Current org.apache.flink.cdc.composer.flink.FlinkEnvironmentUtils#addJar 
will be invoked for each source and sink.
   
   ```java
   public static void addJar(StreamExecutionEnvironment env, URL jarUrl) {
       try {
           Class<StreamExecutionEnvironment> envClass = 
StreamExecutionEnvironment.class;
           Field field = envClass.getDeclaredField("configuration");
           field.setAccessible(true);
           Configuration configuration = ((Configuration) field.get(env));
           List<String> jars =
                   configuration.getOptional(PipelineOptions.JARS).orElse(new 
ArrayList<>());
           jars.add(jarUrl.toString());
           configuration.set(PipelineOptions.JARS, jars);
       } catch (Exception e) {
           throw new RuntimeException("Failed to add JAR to Flink execution 
environment", e);
       } 
   
   ```
   if multiple source or sink share same jar, the par path will be added 
repeatly.


-- 
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]

Reply via email to