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/09/06 07:58:03 UTC

[GitHub] [inlong] gosonzhang opened a new pull request, #5801: [INLONG-5795][TubeMQ]Optimize the implementation of ConsumerEvent.toStrBuilder()

gosonzhang opened a new pull request, #5801:
URL: https://github.com/apache/inlong/pull/5801

   
   - Fixes #5795 
   


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


[GitHub] [inlong] dockerzhang merged pull request #5801: [INLONG-5795][TubeMQ] Optimize the implementation of ConsumerEvent.toStrBuilder()

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5801:
URL: https://github.com/apache/inlong/pull/5801


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


[GitHub] [inlong] gosonzhang commented on a diff in pull request #5801: [INLONG-5795][TubeMQ] Optimize the implementation of ConsumerEvent.toStrBuilder()

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on code in PR #5801:
URL: https://github.com/apache/inlong/pull/5801#discussion_r963504668


##########
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodeconsumer/ConsumerEventManager.java:
##########
@@ -144,9 +144,10 @@ public ConsumerEvent removeFirst(String consumerId) {
             }
         }
         if (event != null) {
-            StringBuilder sBuilder = new StringBuilder(512);
-            sBuilder.append("[Event Removed] ");
-            logger.info(event.toStrBuilder(sBuilder).toString());
+            logger.info(new StringBuilder(512)

Review Comment:
   This is deliberately handled in this way, using StringBuilder to do the processing of log output content



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


[GitHub] [inlong] healchow commented on a diff in pull request #5801: [INLONG-5795][TubeMQ] Optimize the implementation of ConsumerEvent.toStrBuilder()

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5801:
URL: https://github.com/apache/inlong/pull/5801#discussion_r963438254


##########
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodeconsumer/ConsumerEventManager.java:
##########
@@ -144,9 +144,10 @@ public ConsumerEvent removeFirst(String consumerId) {
             }
         }
         if (event != null) {
-            StringBuilder sBuilder = new StringBuilder(512);
-            sBuilder.append("[Event Removed] ");
-            logger.info(event.toStrBuilder(sBuilder).toString());
+            logger.info(new StringBuilder(512)

Review Comment:
   Suggested using the `{}` instead of StringBuilder in log info.



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


[GitHub] [inlong] healchow commented on a diff in pull request #5801: [INLONG-5795][TubeMQ] Optimize the implementation of ConsumerEvent.toStrBuilder()

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5801:
URL: https://github.com/apache/inlong/pull/5801#discussion_r963514966


##########
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodeconsumer/ConsumerEventManager.java:
##########
@@ -144,9 +144,10 @@ public ConsumerEvent removeFirst(String consumerId) {
             }
         }
         if (event != null) {
-            StringBuilder sBuilder = new StringBuilder(512);
-            sBuilder.append("[Event Removed] ");
-            logger.info(event.toStrBuilder(sBuilder).toString());
+            logger.info(new StringBuilder(512)

Review Comment:
   OK~



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