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

Pipeline file opening in FileStream #5129

Closed
thinkharderdev opened this issue Jan 31, 2023 · 1 comment · Fixed by #5161
Closed

Pipeline file opening in FileStream #5129

thinkharderdev opened this issue Jan 31, 2023 · 1 comment · Fixed by #5161
Labels
enhancement New feature or request

Comments

@thinkharderdev
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)

Current FileStream is a state machine that goes from Open (read metadata and build reader) -> Scan (scan decode RecordBatch) in sequence until all files are scanned.

For parquet in particular, the Opener may need to do multiple sequential IO requests:

  1. Read footer to get metadata start offset
  2. Read footer
  3. Fetch page/offset indexes

Seems like it might be possible to parallelize the scan with opening the next file.

Describe the solution you'd like
A clear and concise description of what you want to happen.

FileStream::Scan adds an Option<FileOpenFuture>. If polled in a scan state, try and pop another file and initialize it's FileOpenFuture (eg try and open the file in parallel) so metadata IO can be done in parallel to scanning of the current file.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Not do anything

Additional context
Add any other context or screenshots about the feature request here.

Not sure if this will be workable but want to experiment with it.

@thinkharderdev thinkharderdev added the enhancement New feature or request label Jan 31, 2023
@tustvold
Copy link
Contributor

tustvold commented Feb 1, 2023

Fetching metadata in parallel seems like it could yield fairly significant savings, for very little additional memory overhead 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants