You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-21738] Thriftserver doesn't cancel jobs when session is closed
## What changes were proposed in this pull request?
When a session is closed the Thriftserver doesn't cancel the jobs which may still be running. This is a huge waste of resources.
This PR address the problem canceling the pending jobs when a session is closed.
## How was this patch tested?
The patch was tested manually.
Author: Marco Gaido <[email protected]>
Closesapache#18951 from mgaido91/SPARK-21738.
Copy file name to clipboardExpand all lines: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,9 @@ private[hive] class SparkExecuteStatementOperation(
71
71
72
72
defclose():Unit= {
73
73
// RDDs will be cleaned automatically upon garbage collection.
74
-
sqlContext.sparkContext.clearJobGroup()
75
74
logDebug(s"CLOSING $statementId")
76
75
cleanup(OperationState.CLOSED)
76
+
sqlContext.sparkContext.clearJobGroup()
77
77
}
78
78
79
79
defaddNonNullColumnValue(from: SparkRow, to: ArrayBuffer[Any], ordinal: Int) {
@@ -273,9 +273,6 @@ private[hive] class SparkExecuteStatementOperation(
0 commit comments