panbingkun commented on code in PR #45808:
URL: https://github.com/apache/spark/pull/45808#discussion_r1547424963
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala:
##########
@@ -854,7 +856,8 @@ private[spark] class ApplicationMaster(
logInfo(s"Driver terminated or disconnected! Shutting down.
$remoteAddress")
finish(FinalApplicationStatus.SUCCEEDED,
ApplicationMaster.EXIT_SUCCESS)
} else {
- logError(s"Driver terminated with exit code ${exitCode}! Shutting
down. $remoteAddress")
+ logError(log"Driver terminated with exit code ${MDC(EXIT_CODE,
exitCode)}! " +
+ log"Shutting down. ${MDC(REMOTE_ADDRESS, remoteAddress)}")
Review Comment:
@gengliangwang
Perhaps it would be more reasonable to write this in this way
```
logError(log"Driver terminated with exit code ${MDC(EXIT_CODE, exitCode)}! "
+ log"Shutting down. $remoteAddress")
```
`Not every variable` needs to be `recorded` in the field `content` of `JSON`
Unfortunately, we currently do `not support` this syntax as above, it will
`fail` to compile.
So I submitted a separate PR to address this issue:
https://github.com/apache/spark/pull/45813
--
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]