You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "mridulm (via GitHub)" <gi...@apache.org> on 2023/10/01 22:11:20 UTC

[GitHub] [spark] mridulm commented on a diff in pull request #43165: [SPARK-45377][CORE] Handle InputStream in NettyLogger

mridulm commented on code in PR #43165:
URL: https://github.com/apache/spark/pull/43165#discussion_r1342194602


##########
common/network-common/src/main/java/org/apache/spark/network/util/NettyLogger.java:
##########
@@ -42,6 +45,15 @@ protected String format(ChannelHandlerContext ctx, String eventName, Object arg)
       } else if (arg instanceof ByteBufHolder) {
         return format(ctx, eventName) + " " +
           ((ByteBufHolder) arg).content().readableBytes() + "B";
+      } else if (arg instanceof InputStream) {
+        int available = 0;

Review Comment:
   nit: you can default to `-1` and remove the assignment in `catch`



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org