[ 
https://issues.apache.org/jira/browse/SPARK-49448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LIU updated SPARK-49448:
------------------------
    Description: 
{code:java}
//代码占位符
{code}
private class ExecutionThread(onCompletionPromise: Promise[Unit]) extends 
Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") \{ 
override def run(): Unit = { try { execute() onCompletionPromise.success(()) } 
catch \{ case NonFatal(e) => onCompletionPromise.failure(e) } } }

 

execute method end with ErrorUtils.handleError() function call.  if any 
excetion throw. it will not catch by promise. is it better to catch real 
exceptions with promises instead of.

  was:
private class ExecutionThread(onCompletionPromise: Promise[Unit])
extends Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") {
override def run(): Unit = {
try {
execute()
onCompletionPromise.success(())
} catch {
case NonFatal(e) =>
onCompletionPromise.failure(e)
}
}
}

 

execute method end with ErrorUtils.handleError() function call.  if any 
excetion throw. it will not catch by promise. is it better to catch real 
exceptions with promises instead of.


> Spark Connect ExecuteThreadRunner promise will always complete with success.
> ----------------------------------------------------------------------------
>
>                 Key: SPARK-49448
>                 URL: https://issues.apache.org/jira/browse/SPARK-49448
>             Project: Spark
>          Issue Type: Improvement
>          Components: Connect
>    Affects Versions: 4.0.0
>            Reporter: LIU
>            Priority: Minor
>
> {code:java}
> //代码占位符
> {code}
> private class ExecutionThread(onCompletionPromise: Promise[Unit]) extends 
> Thread(s"SparkConnectExecuteThread_opId=${executeHolder.operationId}") \{ 
> override def run(): Unit = { try { execute() onCompletionPromise.success(()) 
> } catch \{ case NonFatal(e) => onCompletionPromise.failure(e) } } }
>  
> execute method end with ErrorUtils.handleError() function call.  if any 
> excetion throw. it will not catch by promise. is it better to catch real 
> exceptions with promises instead of.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to