hvanhovell opened a new pull request, #41097:
URL: https://github.com/apache/spark/pull/41097

   ### What changes were proposed in this pull request?
   This PR adds `SparkSession.Builder.getOrCreate()` to the scala client. 
`getOrCreate` is used in many existing examples so it is good to support it.
   
   Spark Connect is a bit different from the old API in that it allows you to 
connect to multiple servers in the same process. This means that we cannot 
entirely match the existing semantics (one session for all). I opted to cache a 
number of `SparkSessions`, and make `getOrCreate` return a cached session if 
they share the same client configuration.  I have also added a `create()` 
method for cases where you want a newly instantiated session.
   
   ### Why are the changes needed?
   Improve compatibility with the existing code.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, it adds API.
   
   ### How was this patch tested?
   Added tests for this.


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