Skip to content

Commit

Permalink
Simplify map call
Browse files Browse the repository at this point in the history
  • Loading branch information
rishic3 committed Feb 5, 2025
1 parent 9778ee7 commit b3928c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _find_ports_task(start_port: int) -> List[int]:

# For simplicity assume that ports available on one worker are available on all workers.
rdd = self.spark.sparkContext.parallelize([start_port], numSlices=1)
return rdd.map(lambda start_port: _find_ports_task(start_port)).collect()[0]
return rdd.map(_find_ports_task).collect()[0]

def _get_node_rdd(self) -> RDD:
"""Create and configure RDD with stage-level scheduling for 1 task per node."""
Expand Down

0 comments on commit b3928c5

Please sign in to comment.