Skip to content

Commit

Permalink
[SPARK-14261][SQL] Memory leak in Spark Thrift Server
Browse files Browse the repository at this point in the history
Fixed memory leak (HiveConf in the CommandProcessorFactory)

Author: Oleg Danilov <[email protected]>

Closes apache#12932 from dosoft/SPARK-14261.

(cherry picked from commit e384c7f)
Signed-off-by: Reynold Xin <[email protected]>
(cherry picked from commit 7200e6b)
  • Loading branch information
dosoft authored and zzcclp committed May 20, 2016
1 parent 3d637ab commit 813a6b0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,14 @@ private[hive] class ClientWrapper(
// 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 _ =>
Expand Down

0 comments on commit 813a6b0

Please sign in to comment.