Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/5959#discussion_r29978965
--- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
@@ -783,6 +790,8 @@ abstract class RDD[T: ClassTag](
@deprecated("use mapPartitionsWithIndex and filter", "1.0.0")
def filterWith[A](constructA: Int => A)(p: (T, A) => Boolean): RDD[T] =
withScope {
mapPartitionsWithIndex((index, iter) => {
+ /* val cleanP = sc.clean(p)
+ val cleanA = sc.clean(constructA) */
--- End diff --
@ted-yu I investigated this a little and this won't work because you're
bringing in the whole `SparkContext` into the closure. Instead we need to clean
the closures outside of `mapPartitionsWithIndex` as you have done in other
methods. There is nothing special about `filterWith`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]