panbingkun commented on code in PR #46390:
URL: https://github.com/apache/spark/pull/46390#discussion_r1590759422


##########
core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java:
##########
@@ -195,9 +197,9 @@ public long acquireExecutionMemory(long required, 
MemoryConsumer requestingConsu
       }
 
       consumers.add(requestingConsumer);
-      if (logger.isDebugEnabled()) {
-        logger.debug("Task {} acquired {} for {}", taskAttemptId, 
Utils.bytesToString(got),
-          requestingConsumer);
+      if (LOGGER.isDebugEnabled()) {
+        LOGGER.debug("Task {} acquired {} for {}", 
String.valueOf(taskAttemptId),
+          Utils.bytesToString(got), requestingConsumer.toString());

Review Comment:
   This place does not need to check whether `requestingConsumer` is null, 
because it has been checked previously as following:
   <img width="501" alt="image" 
src="https://github.com/apache/spark/assets/15246973/e2284d90-ae20-48ec-92ff-4f91b4a111ae";>



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to