You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "healchow (via GitHub)" <gi...@apache.org> on 2023/04/27 12:31:02 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #7935: [INLONG-7934][Manager] Optimize the serializationType to support debezium json

healchow commented on code in PR #7935:
URL: https://github.com/apache/inlong/pull/7935#discussion_r1179080013


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/tubemq/TubeMQSourceOperator.java:
##########
@@ -110,17 +110,22 @@ public Map<String, List<StreamSource>> getSourcesMap(InlongGroupInfo groupInfo,
             tubeMQSource.setTopic(streamInfo.getMqResource());
             tubeMQSource.setGroupId(streamId);
             tubeMQSource.setMasterRpc(masterRpc);
-            if (StringUtils.isNotBlank(streamInfo.getDataType())) {
-                String serializationType = DataTypeEnum.forType(streamInfo.getDataType()).getType();
-                tubeMQSource.setSerializationType(serializationType);
-            }
             tubeMQSource.setIgnoreParseError(streamInfo.getIgnoreParseError());
 
             for (StreamSource sourceInfo : streamSources) {
                 if (!Objects.equals(streamId, sourceInfo.getInlongStreamId())) {
                     continue;
                 }
-                tubeMQSource.setSerializationType(sourceInfo.getSerializationType());
+
+                if (sourceInfo.getSourceType().equalsIgnoreCase(SourceType.FILE) ||

Review Comment:
   Do not use `equalsIgnoreCase`, because in the usage scenarios of other modules (such as query MySQL, and Dashboard passing parameters), lowercase types are invalid, and we need to limit the generation of dirty data.



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