Skip to content

Commit e384c7f

Browse files
dosoftrxin
authored andcommitted
[SPARK-14261][SQL] Memory leak in Spark Thrift Server
Fixed memory leak (HiveConf in the CommandProcessorFactory) Author: Oleg Danilov <oleg.danilov@wandisco.com> Closes apache#12932 from dosoft/SPARK-14261.
1 parent 3ba34d4 commit e384c7f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,12 +545,14 @@ private[hive] class HiveClientImpl(
545545
// Throw an exception if there is an error in query processing.
546546
if (response.getResponseCode != 0) {
547547
driver.close()
548+
CommandProcessorFactory.clean(conf)
548549
throw new QueryExecutionException(response.getErrorMessage)
549550
}
550551
driver.setMaxRows(maxRows)
551552

552553
val results = shim.getDriverResults(driver)
553554
driver.close()
555+
CommandProcessorFactory.clean(conf)
554556
results
555557

556558
case _ =>

0 commit comments

Comments
 (0)