You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by azmras <gi...@git.apache.org> on 2017/01/03 07:58:58 UTC

[GitHub] spark pull request #16429: [SPARK-19019][PYTHON] Fix hijacked `collections.n...

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

    https://github.com/apache/spark/pull/16429#discussion_r94367710
  
    --- Diff: python/pyspark/serializers.py ---
    @@ -382,18 +382,30 @@ def _hijack_namedtuple():
             return
     
         global _old_namedtuple  # or it will put in closure
    +    global _old_namedtuple_kwdefaults  # or it will put in closure too
     
         def _copy_func(f):
             return types.FunctionType(f.__code__, f.__globals__, f.__name__,
                                       f.__defaults__, f.__closure__)
     
    +    def _kwdefaults(f):
    +        kargs = getattr(f, "__kwdefaults__", None)
    --- End diff --
    
    after applying patch can you try to run 
    sc.parallelize(range(100), 8)
    and confirm that it is working, because it is not...
    and serialisation of objects goes crazy.. 
    
    Thanks for your efforts


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org