wankunde opened a new pull request #28850:
URL: https://github.com/apache/spark/pull/28850


   ### What changes were proposed in this pull request?
   
   Remove reference from `java.lang.ApplicationShutdownHooks` to `sparkContext` 
when the spark context is stopped.
   
   ### Why are the changes needed?
   
   There is still a reference(eg. `java.lang.ApplicationShutdownHooks` -> 
`org.apache.hive.common.util.ShutdownHookManager$1` -> `SparkContext`) to 
`sparkContext` after the spark context is stopped, so the JVM cannot collect 
that. 
   
   If we start and stop sparkSession several times, there will be a OOM 
exception.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   
   Local Tested.


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to