You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/07 23:39:38 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #32081: [SPARK-34674][CORE] Close SparkContext after the Main method has finished

dongjoon-hyun commented on a change in pull request #32081:
URL: https://github.com/apache/spark/pull/32081#discussion_r609141871



##########
File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
##########
@@ -952,6 +952,12 @@ private[spark] class SparkSubmit extends Logging {
     } catch {
       case t: Throwable =>
         throw findCause(t)
+    } finally {
+      try {
+        org.apache.spark.SparkContext.getOrCreate().stop()

Review comment:
       +1 for @mridulm comment. The root cause of current UT failures might be due to 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.

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



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