I have a spark job which spins out over 3000 tasks. If each task creates its own database connection, that's a lot of connections, and will not be able to share prepared statement. Does any one know of a way to share connections across spark tasks, let's say just inside each worker node?
Note that this is different from sharing variables using broadcast. A connection created in the master can not be shipped to workers and still work.