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

[Data] Move Parquet metadata fetching logic to separate module #45727

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

bveeramani
Copy link
Member

Why are these changes needed?

Currently, Parquet metadata fetching logic is split across parquet_datasource.py and file_meta_provider.py. Moreover, some functions defined in parquet_datasource.py are only called in file_meta_provider.py. To more coherently organize the code, this PR creates a new module parquet_meta_provider.py and moves related logic to it.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani changed the title [Data] Move Parquet metadata fetching logic to separate logic [Data] Move Parquet metadata fetching logic to separate module Jun 4, 2024
@@ -50,22 +50,10 @@

logger = logging.getLogger(__name__)

FRAGMENTS_PER_META_FETCH = 6
PARALLELIZE_META_FETCH_THRESHOLD = 24

# The `num_cpus` for each metadata prefetching task.
# Default to 0.5 instead of 1 because it is cheaper than normal read task.
NUM_CPUS_FOR_META_FETCH_TASK = 0.5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one should be moved as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in the ParquetDatasource implementation, and not by the meta provider:

prefetch_remote_args["num_cpus"] = NUM_CPUS_FOR_META_FETCH_TASK

@bveeramani bveeramani enabled auto-merge (squash) June 4, 2024 23:27
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Jun 4, 2024
@bveeramani bveeramani merged commit e116c5a into ray-project:master Jun 5, 2024
6 checks passed
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
…roject#45727)

Currently, Parquet metadata fetching logic is split across parquet_datasource.py and file_meta_provider.py. Moreover, some functions defined in parquet_datasource.py are only called in file_meta_provider.py. To more coherently organize the code, this PR creates a new module parquet_meta_provider.py and moves related logic to it.

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
yucai pushed a commit to yucai/ray that referenced this pull request Jun 6, 2024
…roject#45727)

Currently, Parquet metadata fetching logic is split across parquet_datasource.py and file_meta_provider.py. Moreover, some functions defined in parquet_datasource.py are only called in file_meta_provider.py. To more coherently organize the code, this PR creates a new module parquet_meta_provider.py and moves related logic to it.

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: yucai <[email protected]>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
…roject#45727)

Currently, Parquet metadata fetching logic is split across parquet_datasource.py and file_meta_provider.py. Moreover, some functions defined in parquet_datasource.py are only called in file_meta_provider.py. To more coherently organize the code, this PR creates a new module parquet_meta_provider.py and moves related logic to it.

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
richardsliu pushed a commit to richardsliu/ray that referenced this pull request Jun 12, 2024
…roject#45727)

Currently, Parquet metadata fetching logic is split across parquet_datasource.py and file_meta_provider.py. Moreover, some functions defined in parquet_datasource.py are only called in file_meta_provider.py. To more coherently organize the code, this PR creates a new module parquet_meta_provider.py and moves related logic to it.

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Richard Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants