diff options
author | gcc <spark-src@condor.rhaag.ip> | 2015-12-06 16:27:40 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-12-06 16:27:40 +0000 |
commit | 04b6799932707f0a4aa4da0f2fc838bdb29794ce (patch) | |
tree | 68dd1055759e159ab3799c199e965b360e12648d /sql | |
parent | b6e8e63a0dbe471187a146c96fdaddc6b8a8e55e (diff) | |
download | spark-04b6799932707f0a4aa4da0f2fc838bdb29794ce.tar.gz spark-04b6799932707f0a4aa4da0f2fc838bdb29794ce.tar.bz2 spark-04b6799932707f0a4aa4da0f2fc838bdb29794ce.zip |
[SPARK-12048][SQL] Prevent to close JDBC resources twice
Author: gcc <spark-src@condor.rhaag.ip>
Closes #10101 from rh99/master.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala | 1 |
1 files changed, 1 insertions, 0 deletions
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 b9dd7f6b40..1c348ed62f 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 @@ -511,6 +511,7 @@ private[sql] class JDBCRDD( } catch { case e: Exception => logWarning("Exception closing connection", e) } + closed = true } override def hasNext: Boolean = { |