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

    https://github.com/apache/spark/pull/1498#discussion_r15567030
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -57,6 +57,12 @@ private[spark] object Utils extends Logging {
         new File(sparkHome + File.separator + "bin", which + suffix)
       }
     
    +  /** Serialize an object using the closure serializer. */
    +  def serializeTaskClosure[T: ClassTag](o: T): Array[Byte] = {
    +    val ser = SparkEnv.get.closureSerializer.newInstance()
    --- End diff --
    
    We could also save an instance of the closure serializer in DAGScheduler 
instead, since it executes everything in one thread. Probably not a big deal 
though but it's something to consider if you're refactoring this code.


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

Reply via email to