linjianchang commented on code in PR #3844:
URL: https://github.com/apache/flink-cdc/pull/3844#discussion_r1910064891


##########
flink-cdc-composer/src/main/java/org/apache/flink/cdc/composer/flink/FlinkPipelineComposer.java:
##########
@@ -126,16 +127,28 @@ private void translate(StreamExecutionEnvironment env, 
PipelineDef pipelineDef)
         // And required constructors
         OperatorIDGenerator schemaOperatorIDGenerator =
                 new 
OperatorIDGenerator(schemaOperatorTranslator.getSchemaOperatorUid());
-        DataSource dataSource =
-                sourceTranslator.createDataSource(pipelineDef.getSource(), 
pipelineDefConfig, env);
+        List<SourceDef> sourceDefs = pipelineDef.getSources();
+        //        DataSource dataSource =
+        //                sourceTranslator.createDataSource(sourceDefs, 
pipelineDefConfig, env);
         DataSink dataSink =
                 sinkTranslator.createDataSink(pipelineDef.getSink(), 
pipelineDefConfig, env);
-
-        boolean isParallelMetadataSource = 
dataSource.isParallelMetadataSource();
-
         // O ---> Source
-        DataStream<Event> stream =
-                sourceTranslator.translate(pipelineDef.getSource(), 
dataSource, env, parallelism);
+        DataStream<Event> stream = null;
+        DataSource dataSource = null;
+        for (SourceDef sourceDef : sourceDefs) {
+            dataSource = sourceTranslator.createDataSource(sourceDef, 
pipelineDefConfig, env);
+            DataStream<Event> streamBranch =
+                    sourceTranslator.translate(sourceDef, dataSource, env, 
parallelism);
+            if (stream == null) {
+                stream = streamBranch;
+            } else {
+                stream = stream.union(streamBranch);
+            }
+        }
+        boolean isParallelMetadataSource = 
dataSource.isParallelMetadataSource();

Review Comment:
   Already modified



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