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/02/28 14:17:13 UTC

[GitHub] [incubator-inlong] luchunliang commented on a change in pull request #2713: [INLONG-2384][SDK] Sort-sdk support Tube consumer of PB compression cache message protocol

luchunliang commented on a change in pull request #2713:
URL: https://github.com/apache/incubator-inlong/pull/2713#discussion_r815926849



##########
File path: inlong-sdk/sort-sdk/src/main/java/org/apache/inlong/sdk/sort/impl/tube/InLongTubeFetcherImpl.java
##########
@@ -261,11 +275,14 @@ public void run() {
                     if (null != message && TErrCodeConstants.SUCCESS == message.getErrCode()) {
                         List<InLongMessage> msgs = new ArrayList<>();
                         for (Message msg : message.getMessageList()) {
-                            msgs.add(new InLongMessage(msg.getData(), getAttributeMap(msg.getAttribute())));
+                            List<InLongMessage> deserialize = deserializer
+                                    .deserialize(context, inLongTopic, getAttributeMap(msg.getAttribute()),
+                                            msg.getData());
+                            msgs.addAll(deserialize);
                             context.getStatManager()
                                     .getStatistics(context.getConfig().getSortTaskId(),
                                             inLongTopic.getInLongCluster().getClusterId(), inLongTopic.getTopic())
-                                    .addMsgCount(1L).addConsumeSize(msg.getData().length);
+                                    .addMsgCount(deserialize.size()).addConsumeSize(msg.getData().length);

Review comment:
       Why do the code put deserialize.size() to MsgCount? "deserialize.size()" is the message count or the uncompressed message size.




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