File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,6 @@ def test_barrier_with_python_worker_reuse(self):
148148 reused python worker.
149149 """
150150 import os
151- self .sc ._conf .set ("spark.python.work.reuse" , "true" )
152151 # start a normal job first to start all workers and get all worker pids
153152 worker_pids = self .sc .parallelize (range (2 ), 2 ).map (lambda x : os .getpid ()).collect ()
154153 # the worker will reuse in this barrier job
@@ -164,8 +163,8 @@ def context_barrier(x):
164163 return (time .time (), os .getpid ())
165164
166165 result = rdd .barrier ().mapPartitions (f ).map (context_barrier ).collect ()
167- times = map (lambda x : x [0 ], result )
168- pids = map (lambda x : x [1 ], result )
166+ times = list ( map (lambda x : x [0 ], result ) )
167+ pids = list ( map (lambda x : x [1 ], result ) )
169168 # check both barrier and worker reuse effect
170169 self .assertTrue (max (times ) - min (times ) < 1 )
171170 for pid in pids :
You can’t perform that action at this time.
0 commit comments