Repository: spark Updated Branches: refs/heads/branch-1.6 2feac49fb -> c8747a9db
[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/c8747a9d Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c8747a9d Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c8747a9d Branch: refs/heads/branch-1.6 Commit: c8747a9db718deefa5f61cc4dc692c439d4d5ab6 Parents: 2feac49 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:27:51 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/c8747a9d/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 b2c8847..b2b5b26 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 @@ -509,6 +509,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