ueshin opened a new pull request #28986:
URL: https://github.com/apache/spark/pull/28986


   ### What changes were proposed in this pull request?
   
   This PR proposes to disallow to create `SparkContext` in executors, e.g., in 
UDFs.
   
   ### Why are the changes needed?
   
   Currently executors can create SparkContext, but shouldn't be able to create 
it.
   
   ```scala
   sc.range(0, 1).foreach { _ =>
     new SparkContext(new SparkConf().setAppName("test").setMaster("local"))
   }
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, uses won't be able to create `SparkContext` in executors.
   
   ### How was this patch tested?
   
   Addes tests.
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to