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


##########
inlong-sort/sort-formats/format-rowdata/format-inlongmsg-rowdata-binlog/src/main/java/org/apache/inlong/sort/formats/inlongmsgbinlog/InLongMsgBinlogUtils.java:
##########
@@ -73,17 +74,20 @@ public static InLongMsgHead parseHead(String attr) {
 
         // Extracts interface from the attributes.
         String streamId;
-        if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_NAME)) {
+        if (attributes.containsKey(INLONGMSG_ATTR_STREAM_ID)) {
+            streamId = attributes.get(INLONGMSG_ATTR_STREAM_ID);
+        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_TID)) {
+            streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_TID);
+        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_NAME)) {
             streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_NAME);
         } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_ID)) {
             streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_ID);
-        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_TID)) {
-            streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_TID);
         } else {
             throw new IllegalArgumentException(
-                    "Could not find " + INLONGMSG_ATTR_INTERFACE_NAME +
-                            " or " + INLONGMSG_ATTR_INTERFACE_ID +
-                            " or " + INLONGMSG_ATTR_INTERFACE_TID + " in 
attributes!");
+                    "Could not find " + INLONGMSG_ATTR_STREAM_ID
+                            + " or " + INLONGMSG_ATTR_INTERFACE_TID
+                            + " or " + INLONGMSG_ATTR_INTERFACE_NAME
+                            + " or " + INLONGMSG_ATTR_INTERFACE_ID + " in 
attributes!");

Review Comment:
   ```suggestion
                               + " and " + INLONGMSG_ATTR_INTERFACE_TID
                               + " and " + INLONGMSG_ATTR_INTERFACE_NAME
                               + " and " + INLONGMSG_ATTR_INTERFACE_ID + " in 
attributes!");
   ```



##########
inlong-sort/sort-formats/format-rowdata/format-inlongmsg-rowdata-csv/src/main/java/org/apache/inlong/sort/formats/inlongmsgcsv/InLongMsgCsvUtils.java:
##########
@@ -65,20 +65,20 @@ public static InLongMsgHead parseHead(String attr) {
         // Extracts interface from the attributes.
         String streamId;
 
-        if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_NAME)) {
+        if (attributes.containsKey(INLONGMSG_ATTR_STREAM_ID)) {
+            streamId = attributes.get(INLONGMSG_ATTR_STREAM_ID);
+        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_TID)) {
+            streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_TID);
+        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_NAME)) {
             streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_NAME);
         } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_ID)) {
             streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_ID);
-        } else if (attributes.containsKey(INLONGMSG_ATTR_INTERFACE_TID)) {
-            streamId = attributes.get(INLONGMSG_ATTR_INTERFACE_TID);
-        } else if (attributes.containsKey(INLONGMSG_ATTR_STREAMID)) {
-            streamId = attributes.get(INLONGMSG_ATTR_STREAMID);
         } else {
             throw new IllegalArgumentException(
-                    "Could not find " + INLONGMSG_ATTR_INTERFACE_NAME +
-                            " or " + INLONGMSG_ATTR_INTERFACE_ID +
+                    "Could not find " + INLONGMSG_ATTR_STREAM_ID +
                             " or " + INLONGMSG_ATTR_INTERFACE_TID +
-                            " or " + INLONGMSG_ATTR_STREAMID + " in 
attributes!");
+                            " or " + INLONGMSG_ATTR_INTERFACE_NAME +
+                            " or " + INLONGMSG_ATTR_INTERFACE_ID + " in 
attributes!");

Review Comment:
   ```suggestion
                               " and " + INLONGMSG_ATTR_INTERFACE_NAME +
                               " and " + INLONGMSG_ATTR_INTERFACE_ID + " in 
attributes!");
   ```



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