Repository: spark
Updated Branches:
  refs/heads/branch-2.0 c08739afb -> 7bb33352f


[SPARK-14261][SQL] Memory leak in Spark Thrift Server

Fixed memory leak (HiveConf in the CommandProcessorFactory)

Author: Oleg Danilov <oleg.dani...@wandisco.com>

Closes #12932 from dosoft/SPARK-14261.

(cherry picked from commit e384c7fbb94cef3c18e8fa8d06159b76b88b5167)
Signed-off-by: Reynold Xin <r...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7bb33352
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7bb33352
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7bb33352

Branch: refs/heads/branch-2.0
Commit: 7bb33352f2409493bd7e3880d98508dcb1be888d
Parents: c08739a
Author: Oleg Danilov <oleg.dani...@wandisco.com>
Authored: Thu May 19 22:23:28 2016 -0700
Committer: Reynold Xin <r...@databricks.com>
Committed: Thu May 19 22:23:35 2016 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7bb33352/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
----------------------------------------------------------------------
diff --git 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
index 0f0c1b0..71d5c99 100644
--- 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
+++ 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
@@ -545,12 +545,14 @@ private[hive] class HiveClientImpl(
           // Throw an exception if there is an error in query processing.
           if (response.getResponseCode != 0) {
             driver.close()
+            CommandProcessorFactory.clean(conf)
             throw new QueryExecutionException(response.getErrorMessage)
           }
           driver.setMaxRows(maxRows)
 
           val results = shim.getDriverResults(driver)
           driver.close()
+          CommandProcessorFactory.clean(conf)
           results
 
         case _ =>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to