pan3793 commented on PR #52091:
URL: https://github.com/apache/spark/pull/52091#issuecomment-3223609798

   > What's the behavior for cluster mode?
   
   @yaooqinn In YARN cluster mode, the AM always sends a kill signal to 
terminate the Driver JVM after main exited; there is no behavior change from 
the user's perspective, regardless of whether 
`spark.submit.callSystemExitOnMainExit` is on or off.
   
   In K8s cluster mode, after the main method exits, `SparkContext` is stopped,
   1. if there are daemon threads in driver JVM process
     1.1. JVM process will hang without this patch, or 
`spark.submit.callSystemExitOnMainExit` is false
     1.2. JVM process will exit when `spark.submit.callSystemExitOnMainExit` is 
true
   2. if there are no daemon threads in driver JVM process, the JVM process 
will exit
   
   In summary, from the user's perspective, this functionality helps K8s 
cluster mode for jobs that have daemon threads in driver - they can enable 
`spark.submit.callSystemExitOnMainExit` to avoid driver Pod hang after Spark 
job finishes.


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