You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/06 11:02:11 UTC

[GitHub] [incubator-inlong] healchow commented on a change in pull request #2943: [INLONG-2912][Manager] Add fields for the binlog task

healchow commented on a change in pull request #2943:
URL: https://github.com/apache/incubator-inlong/pull/2943#discussion_r820215992



##########
File path: inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongStreamSourceTransfer.java
##########
@@ -160,23 +178,27 @@ private static KafkaSourceRequest createKafkaSourceRequest(KafkaSource kafkaSour
 
     private static BinlogSourceRequest createBinlogSourceRequest(MySQLBinlogSource binlogSource,
             InlongStreamInfo streamInfo) {
-        BinlogSourceRequest binlogSourceRequest = new BinlogSourceRequest();
-        binlogSourceRequest.setSourceName(binlogSource.getSourceName());
-        binlogSourceRequest.setInlongGroupId(streamInfo.getInlongGroupId());
-        binlogSourceRequest.setInlongStreamId(streamInfo.getInlongStreamId());
-        binlogSourceRequest.setSourceType(binlogSource.getSourceType().name());
+        BinlogSourceRequest sourceRequest = new BinlogSourceRequest();

Review comment:
       Because the request is a subclass, to use the builder, you need to write the construction method of all the parameters and modify the parent class, which does not conform to the open-closed principle.




-- 
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: commits-unsubscribe@inlong.apache.org

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