Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/6323#issuecomment-104372021
  
    Serializer instances aren't thread-safe, but it looks like this 
single-threaded use should be fine.  I implemented some similar optimizations 
in #5606 and am in the process of fixing a rare corner-case related to 
serializer re-use with uncommon Kryo configurations (#6293).  Based on 
discussion in those patches, this change looks good to me.
    
    We might actually be able to go a bit further and lift the serializer 
instance into a field of CoarseGrainedSchedulerBackend itself.  That would be a 
bit riskier in terms of code review burden, since we'd have to double-check 
that CoarseGrainedSchedulerBackend is only ever used from a single thread (I 
think that this is actually the case, but would be good to double-check).


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