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

    https://github.com/apache/spark/pull/2287#discussion_r17192524
  
    --- Diff: python/pyspark/cloudpickle.py ---
    @@ -691,13 +699,13 @@ def save_file(self, obj):
                 tmpfile.close()
                 if tst != '':
                     raise pickle.PicklingError("Cannot pickle file %s as it 
does not appear to map to a physical, real file" % name)
    -        elif fsize > SerializingAdapter.max_transmit_data:
    -            raise pickle.PicklingError("Cannot pickle file %s as it 
exceeds cloudconf.py's max_transmit_data of %d" %
    -                                       
(name,SerializingAdapter.max_transmit_data))
    +        elif fsize > self._conf.get("max_transmit_data"):
    +            raise pickle.PicklingError("Cannot pickle file %s as it 
exceeds spark.cloudpickle.max_transmit_data of %d" %
    +                                       
(name,self._conf.get("max_transmit_data")))
             else:
                 try:
                     tmpfile = file(name)
    -                contents = 
tmpfile.read(SerializingAdapter.max_transmit_data)
    +                contents = 
tmpfile.read(self._conf.get("max_transmit_data"))
    --- End diff --
    
    Basically, couldpickle is on third-party module, so it's better to keep it 
alone (without depending on other parts of spark).
    
    So I think it's fine to remove these about SerializingAdapter, we could 
have no size limitation for files.
    
    Also, I had tried to do similar things in PR #2144 


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

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

Reply via email to