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


##########
resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala:
##########
@@ -306,8 +308,8 @@ private[spark] abstract class YarnSchedulerBackend(
             .recover {
               case NonFatal(e) =>
                 logWarning(log"Attempted to get executor loss reason for 
executor id " +
-                  log"${MDC(EXECUTOR_ID, executorId)} at RPC address " +
-                  log"${MDC(HOST_PORT, executorRpcAddress)}, but got no 
response. " +
+                  log"${MDC(LogKey.EXECUTOR_ID, executorId)} at RPC address " +

Review Comment:
   If imported in the form of `import 
org.apache.spark.internal.LogKey.{EXECUTOR_ID, HOST_PORT, REASON ...}` in the 
header, it will be very `long`, so it is directly imported as `import 
org.apache.spark.internal.LogKey` here and prefixed in the code.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to