Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5787#discussion_r29543375
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala 
---
    @@ -131,7 +131,10 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
         lazy val cachedSerializer = SparkEnv.get.serializer.newInstance()
         val createZero = () => 
cachedSerializer.deserialize[U](ByteBuffer.wrap(zeroArray))
     
    -    combineByKey[U]((v: V) => seqOp(createZero(), v), seqOp, combOp, 
partitioner)
    +    val cleanedSeqOp = self.context.clean(seqOp)
    +    val cleanedCombOp = self.context.clean(combOp)
    +    combineByKey[U](
    +      (v: V) => cleanedSeqOp(createZero(), v), cleanedSeqOp, 
cleanedCombOp, partitioner)
    --- End diff --
    
    In places like `reduceByKey` we pass it directly to `combineByKey` so it's 
more natural. Here we do a bunch of stuff before we clean, and it's kinda weird 
to just clean one of passed in closures but not the other.
    
    But this is a small enough point that I'll just skip the cleaning here.


---
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]

Reply via email to