You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "aloyszhang (via GitHub)" <gi...@apache.org> on 2024/03/28 06:59:42 UTC

Re: [PR] [INLONG-9879][Sort] Fix the inlongmsg-rowdata-kv format parse head error [inlong]

aloyszhang commented on code in PR #9880:
URL: https://github.com/apache/inlong/pull/9880#discussion_r1542405547


##########
inlong-sort/sort-formats/format-row/format-inlongmsg-binlog/src/main/java/org/apache/inlong/sort/formats/inlongmsgbinlog/InLongMsgBinlogUtils.java:
##########
@@ -117,10 +118,14 @@ public static InLongMsgHead parseHead(String attr) {
             streamId = attributes.get(INLONGMSG_ATTR_STREAM_ID);
         } else if (attributes.containsKey(INLONGMSG_ATTR_TID)) {
             streamId = attributes.get(INLONGMSG_ATTR_TID);
+        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_NAME)) {
+            streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_NAME);
         } else {
             throw new IllegalArgumentException(
                     "Could not find " + INLONGMSG_ATTR_STREAM_ID
-                            + " or " + INLONGMSG_ATTR_TID + " in attributes!");
+                            + " or " + INLONGMSG_ATTR_TID
+                            + " or " + INLONGMSG_ATTR_INTERFACE_NAME

Review Comment:
   ```suggestion
                               + " and " + INLONGMSG_ATTR_TID
                               + " and " + INLONGMSG_ATTR_INTERFACE_NAME
   ```



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