Github user szhem commented on a diff in the pull request:
https://github.com/apache/spark/pull/23083#discussion_r235308451
--- Diff: core/src/main/scala/org/apache/spark/TaskContext.scala ---
@@ -127,9 +127,21 @@ abstract class TaskContext extends Serializable {
// Note that due to this scala bug:
https://github.com/scala/bug/issues/11016, we need to make
// this function polymorphic for every scala version >= 2.12,
otherwise an overloaded method
// resolution error occurs at compile time.
- addTaskCompletionListener(new TaskCompletionListener {
- override def onTaskCompletion(context: TaskContext): Unit =
f(context)
- })
+ addTaskCompletionListener(TaskCompletionListenerWrapper(f))
+ }
+
+ /**
+ * Removes a (Java friendly) listener that is no longer needed to be
executed on task completion.
+ */
+ def remoteTaskCompletionListener(listener: TaskCompletionListener):
TaskContext
--- End diff --
Yep, seems that `v` was replaced with `t` on my keyboard)
Thanks a lot!
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]