Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ private[hive] class SparkExecuteStatementOperation(

def close(): Unit = {
// RDDs will be cleaned automatically upon garbage collection.
sqlContext.sparkContext.clearJobGroup()
logDebug(s"CLOSING $statementId")
cleanup(OperationState.CLOSED)
sqlContext.sparkContext.clearJobGroup()
}

def addNonNullColumnValue(from: SparkRow, to: ArrayBuffer[Any], ordinal: Int) {
Expand Down Expand Up @@ -273,9 +273,6 @@ private[hive] class SparkExecuteStatementOperation(

override def cancel(): Unit = {
logInfo(s"Cancel '$statement' with $statementId")
if (statementId != null) {
sqlContext.sparkContext.cancelJobGroup(statementId)
}
cleanup(OperationState.CANCELED)
}

Expand All @@ -287,6 +284,9 @@ private[hive] class SparkExecuteStatementOperation(
backgroundHandle.cancel(true)
}
}
if (statementId != null) {
sqlContext.sparkContext.cancelJobGroup(statementId)
}
}
}

Expand Down