Github user advancedxy commented on a diff in the pull request: https://github.com/apache/spark/pull/23083#discussion_r235299353 --- Diff: core/src/main/scala/org/apache/spark/TaskContextImpl.scala --- @@ -99,6 +99,13 @@ private[spark] class TaskContextImpl( this } + override def remoteTaskCompletionListener(listener: TaskCompletionListener) + : this.type = synchronized { + onCompleteCallbacks -= listener --- End diff -- I'm not use whether we should add `removeTaskCompletionListener` or not. If we are going to add this method. Then this's an O(n) operation. Maybe we need to replace onCompletedCallbacks to a LinkedHashSet?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org