spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-3415] [PySpark] removes SerializingAdap...
Date Fri, 05 Sep 2014 18:25:46 GMT
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2287#discussion_r17188918
  
    --- Diff: python/pyspark/tests.py ---
    @@ -180,6 +180,22 @@ def tearDown(self):
             self.sc.stop()
             sys.path = self._old_sys_path
     
    +class CloudPickleTestCase(PySparkTestCase):
    +    def SetUp(self):
    +        PySparkTestCase.setUp(self)
    +    def tearDown(self):
    +        PySparkTestCase.tearDown(self)
    +    def test_CloudPickle(self):
    +        self.t = self.CloudPickleTestClass()
    +        a = [ 1 , 2, 3, 4, 5 ]
    +        b = self.sc.parallelize(a)
    +        c = b.map(self.t.getOk)
    +        self.assertEquals('ok', c.first())
    +    class CloudPickleTestClass(object):
    --- End diff --
    
    Do you need to define a separate class to test this?  Maybe a simpler reproduction would
be to directly instantiate CloudPickleSerializer and attempt to dump `sys.stderr` directly
(or a function that references `sys.stderr` in its closure).


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


Mime
View raw message