GitHub user huaxingao opened a pull request:
https://github.com/apache/spark/pull/10095
[SPARK-12088][SQL]check connection.isClosed before calling connectionâ¦
In Java Spec java.sql.Connection, it has
boolean getAutoCommit() throws SQLException
Throws:
SQLException - if a database access error occurs or this method is called
on a closed connection
So if conn.getAutoCommit is called on a closed connection, a SQLException
will be thrown. Even though the code catch the SQLException and program can
continue, I think we should check conn.isClosed before calling
conn.getAutoCommit to avoid the unnecessary SQLException.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/huaxingao/spark spark-12088
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10095.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10095
----
commit 0efeb958ed118aba3b6c6d2649c0cec58c43131d
Author: Huaxin Gao <[email protected]>
Date: 2015-12-01T20:41:06Z
[SPARK-12088][SQL]check connection.isClosed before calling
connection.getAutoCommit in JDBCRDD
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]