-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOP-22427] Do not keep open JDBC connection on Spark driver
- Loading branch information
Showing
4 changed files
with
34 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Since now all JDBC connections opened by ``connection.fetch(...)``, ``connection.execute(...)`` or ``connection.check()`` | ||
are immediately closed after the statements is executed. | ||
|
||
Previously Spark session with ``master=local[1]`` opened 3 connections to target DB - one for ``.check()``, | ||
another for Spark driver interaction with DB to create tables, and last one for Spark executor. Now only 2 connections are opened. | ||
This is important for RDBMS like Postgres or Greenplum where number of connections is strictly limited and limit is usually quite low. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters