aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Danilov <oleg.danilov@wandisco.com>2016-05-19 22:23:28 -0700
committerReynold Xin <rxin@databricks.com>2016-05-19 22:23:28 -0700
commite384c7fbb94cef3c18e8fa8d06159b76b88b5167 (patch)
tree1b36974b6f3f22fb531898ca887ac75cf0fa9026
parent3ba34d435c1f61435c2dddc28650cd111e7c1f33 (diff)
downloadspark-e384c7fbb94cef3c18e8fa8d06159b76b88b5167.tar.gz
spark-e384c7fbb94cef3c18e8fa8d06159b76b88b5167.tar.bz2
spark-e384c7fbb94cef3c18e8fa8d06159b76b88b5167.zip
[SPARK-14261][SQL] Memory leak in Spark Thrift Server
Fixed memory leak (HiveConf in the CommandProcessorFactory) Author: Oleg Danilov <oleg.danilov@wandisco.com> Closes #12932 from dosoft/SPARK-14261.
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala2
1 files changed, 2 insertions, 0 deletions
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 0f0c1b0702..71d5c9960a 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 _ =>