lyy-pineapple commented on code in PR #36952:
URL: https://github.com/apache/spark/pull/36952#discussion_r905766151
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala:
##########
@@ -374,29 +374,33 @@ private[spark] class ApplicationMaster(
*/
final def unregister(status: FinalApplicationStatus, diagnostics: String =
null): Unit = {
synchronized {
- if (registered && !unregistered) {
+ if (!unregistered) {
logInfo(s"Unregistering ApplicationMaster with $status" +
Option(diagnostics).map(msg => s" (diag message:
$msg)").getOrElse(""))
unregistered = true
- client.unregister(status, Option(diagnostics).getOrElse(""))
+ client.unregister(status, yarnConf, Option(diagnostics).getOrElse(""))
}
}
}
final def finish(status: FinalApplicationStatus, code: Int, msg: String =
null): Unit = {
synchronized {
if (!finished) {
+ var errorMsg = msg
val inShutdown = ShutdownHookManager.inShutdown()
if (registered || !isClusterMode) {
exitCode = code
finalStatus = status
} else {
finalStatus = FinalApplicationStatus.FAILED
exitCode = ApplicationMaster.EXIT_SC_NOT_INITED
+ if(msg == null) {
Review Comment:
my failed.Fixed it.
--
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]