Repository: spark Updated Branches: refs/heads/branch-1.5 ed7264ba2 -> 8bbb3cdd1
[SPARK-12048][SQL] Prevent to close JDBC resources twice Author: gcc <spark-...@condor.rhaag.ip> Closes #10101 from rh99/master. (cherry picked from commit 04b6799932707f0a4aa4da0f2fc838bdb29794ce) Signed-off-by: Sean Owen <so...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8bbb3cdd Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8bbb3cdd Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8bbb3cdd Branch: refs/heads/branch-1.5 Commit: 8bbb3cdd140cf0ddf55ac4cdafb3b59024bf20fe Parents: ed7264b Author: gcc <spark-...@condor.rhaag.ip> Authored: Sun Dec 6 16:27:40 2015 +0000 Committer: Sean Owen <so...@cloudera.com> Committed: Sun Dec 6 16:28:04 2015 +0000 ---------------------------------------------------------------------- .../org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/8bbb3cdd/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala index a956ae6..6dc92c3 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala @@ -467,6 +467,7 @@ private[sql] class JDBCRDD( } catch { case e: Exception => logWarning("Exception closing connection", e) } + closed = true } override def hasNext: Boolean = { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org