pan3793 commented on code in PR #56736:
URL: https://github.com/apache/spark/pull/56736#discussion_r3475949106


##########
core/src/main/scala/org/apache/spark/deploy/Client.scala:
##########
@@ -180,11 +180,14 @@ private class ClientEndpoint(
           System.exit(-1)
         case _ =>
           state.get match {
-            case DriverState.FINISHED | DriverState.FAILED |
-                 DriverState.ERROR | DriverState.KILLED =>
+            case DriverState.FINISHED =>
               logInfo(log"State of driver ${MDC(DRIVER_ID, 
submittedDriverID)}" +
                 log" is ${MDC(DRIVER_STATE, state.get)}, exiting spark-submit 
JVM.")
               System.exit(0)
+            case DriverState.FAILED | DriverState.ERROR | DriverState.KILLED =>
+                  logError(log"State of driver ${MDC(DRIVER_ID, 
submittedDriverID)}" +
+                    log" is ${MDC(DRIVER_STATE, state.get)}, exiting 
spark-submit JVM.")
+                  System.exit(-1)

Review Comment:
   is it possible to forward the real exit code of the driver instead of always 
returning -1?



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