This is an automated email from the ASF dual-hosted git repository.
yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new cc6c10110f7 [SPARK-45696][CORE] Fix method tryCompleteWith in trait
Promise is deprecated
cc6c10110f7 is described below
commit cc6c10110f7314df2a0b4a02e30b9124f4600307
Author: zhaomin <[email protected]>
AuthorDate: Wed Nov 22 11:57:20 2023 +0800
[SPARK-45696][CORE] Fix method tryCompleteWith in trait Promise is
deprecated
### What changes were proposed in this pull request?
replace scala.concurrent.Promise#tryCompleteWith with
scala.concurrent.Promise#completeWith
### Why are the changes needed?
scala.concurrent.Promise#tryCompleteWith is deprecated since scala_2.13
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
pass actions
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #43556 from zhaomin1423/45696.
Authored-by: zhaomin <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
---
core/src/main/scala/org/apache/spark/FutureAction.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/scala/org/apache/spark/FutureAction.scala
b/core/src/main/scala/org/apache/spark/FutureAction.scala
index a68700421b8..f5dee3c9dab 100644
--- a/core/src/main/scala/org/apache/spark/FutureAction.scala
+++ b/core/src/main/scala/org/apache/spark/FutureAction.scala
@@ -186,7 +186,7 @@ class ComplexFutureAction[T](run : JobSubmitter =>
Future[T])
@volatile private var subActions: List[FutureAction[_]] = Nil
// A promise used to signal the future.
- private val p = Promise[T]().tryCompleteWith(run(jobSubmitter))
+ private val p = Promise[T]().completeWith(run(jobSubmitter))
override def cancel(): Unit = synchronized {
_cancelled = true
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]