You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by "heylch (via GitHub)" <gi...@apache.org> on 2024/02/20 23:11:12 UTC
Re: [PR] [LIVY-786] Fix cancellation of driver side jobs [incubator-livy]
heylch commented on code in PR #307:
URL: https://github.com/apache/incubator-livy/pull/307#discussion_r1496666827
##########
repl/src/main/scala/org/apache/livy/repl/AbstractSparkInterpreter.scala:
##########
@@ -349,4 +355,10 @@ abstract class AbstractSparkInterpreter extends Interpreter with Logging {
output
}
+
+ override def cancel(): Unit = {
+ if (currentThread != null) {
+ currentThread.interrupt()
Review Comment:
interrupt cannot terminate the running task. This can resolve the problem of `Thread.sleep(xxx)`, but it won't help for long running task like `while(true): xxx`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@livy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org