Skip to content
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

apply_neighborhood/regrid: rdd size/partition inflation #191

Closed
jdries opened this issue Aug 2, 2023 · 2 comments
Closed

apply_neighborhood/regrid: rdd size/partition inflation #191

jdries opened this issue Aug 2, 2023 · 2 comments
Assignees

Comments

@jdries
Copy link
Contributor

jdries commented Aug 2, 2023

It seems that regridding from a large tile size (e.g. 10224 or 512) to a small size (e.g. 64) results in very large rdd/partition sizes, which is unexpected.

My theory is that the 'crop' method used in Regrid:
https://github.com/locationtech/geotrellis/blob/d65d6a22eb70efd96caa5c6f5f660b2b936b2763/spark/src/main/scala/geotrellis/spark/regrid/Regrid.scala#L122
Is a lazy crop, which keeps the original array instead of copying the smaller chunk of data out of the larger one. So when Spark serializes the rdd, it also copies over all of the larger arrays backing the cropped types, inflating the data a lot.

Image

@jdries jdries self-assigned this Aug 3, 2023
@jdries
Copy link
Contributor Author

jdries commented Aug 3, 2023

Committed a fix for this one, would still like to open a PR in geotrellis.

@jdries
Copy link
Contributor Author

jdries commented Aug 7, 2023

closing this one, a PR has been opened!

@jdries jdries closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant