New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting FragmentRDD pipe paralellism #1977

Closed
pstawinski opened this Issue Apr 10, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@pstawinski
Copy link

pstawinski commented Apr 10, 2018

Hi, I'm pretty new to Spark/Adam. While I was playing with the pipe function I hit a too big parallelism problem: simply too many subprocesses are created. Each subprocess uses a lot of RAM, so I cannot afford having many of them on a single processing node.

I'd like to limit the number of subprocesses that my FragmentRDD is piped to (on single computer), however I didn't find any way to do so -- there is no .repartition on FragmentRDD . Is there a way to force piping multiple partitions into single process or can I repartition my FragmentRDD somehow?

Thank you for your help and please forgive me if this is a trivial question,
Piotr

@heuermh

This comment has been minimized.

Copy link
Member

heuermh commented Apr 10, 2018

Hello @pstawinski!

FragmentRDD does not extend RDD, rather it contains one. To call repartition, you would

val fragments: FragmentRDD = ...
fragments.transform(rdd => rdd.repartition(n))

In fact, the reference to rdd is a lazy, if you'd rather, FragmentRDD can represent itself as a Dataset instead

val fragments: FragmentRDD = ...
fragments.transformDataset(dataset => dataset.repartition(n))
@pstawinski

This comment has been minimized.

Copy link

pstawinski commented Apr 10, 2018

Thank you!
Best wishes,
Piotr

@pstawinski pstawinski closed this Apr 10, 2018

@heuermh heuermh added this to the 0.24.1 milestone Aug 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment