Skip to content

Cloud Fetch download manager #146

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

Merged
merged 12 commits into from
Jul 3, 2023

Conversation

mattdeekay
Copy link
Contributor

Download manager for Cloud Fetch. Maintains a thread pool for ResultFileDownloadHandler download threads. add_file_links() method is called to prepare handlers, one for each cloud fetch link. get_next_downloaded_file() will schedule relevant handlers for download, check/wait for the download status of the next file the client needs, and returns the downloaded file.

@mattdeekay mattdeekay self-assigned this Jun 14, 2023
@mattdeekay mattdeekay changed the base branch from main to cloudfetch June 14, 2023 17:59
@yunbodeng-db yunbodeng-db requested review from rcypher-databricks and removed request for arikfr June 20, 2023 21:45
@mattdeekay mattdeekay changed the base branch from cloudfetch to main June 20, 2023 21:48
Copy link
Contributor

@susodapop susodapop left a comment

Choose a reason for hiding this comment

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

Note: to review this in my local environment I had to cherry pick these commits on top of the commits for #127.

@mattdeekay mattdeekay force-pushed the cloudfetch-download-manager branch from da6260f to f8cdfc5 Compare June 27, 2023 23:33
@mattdeekay mattdeekay force-pushed the cloudfetch-download-manager branch from d8f6c77 to 0499158 Compare June 28, 2023 00:26
Signed-off-by: Matthew Kim <[email protected]>
@mattdeekay mattdeekay force-pushed the cloudfetch-download-manager branch from 0499158 to 243ba57 Compare June 28, 2023 00:32
@mattdeekay mattdeekay merged commit 01b7a8d into databricks:main Jul 3, 2023
susodapop pushed a commit to unj1m/databricks-sql-python that referenced this pull request Sep 19, 2023
* Cloud Fetch download manager

Signed-off-by: Matthew Kim <[email protected]>

* Bug fix: submit handler.run

Signed-off-by: Matthew Kim <[email protected]>

* Type annotations

Signed-off-by: Matthew Kim <[email protected]>

* Namedtuple -> dataclass

Signed-off-by: Matthew Kim <[email protected]>

* Shutdown thread pool and clear handlers

Signed-off-by: Matthew Kim <[email protected]>

* Docstrings and comments

Signed-off-by: Matthew Kim <[email protected]>

* handler.run is the correct call

Signed-off-by: Matthew Kim <[email protected]>

* Link expiry buffer in secs

Signed-off-by: Matthew Kim <[email protected]>

* Adding type annotations for download_handlers and downloadable_result_settings

Signed-off-by: Matthew Kim <[email protected]>

* Move DownloadableResultSettings to downloader.py to avoid circular import

Signed-off-by: Matthew Kim <[email protected]>

* Black linting

Signed-off-by: Matthew Kim <[email protected]>

* Timeout is never None

Signed-off-by: Matthew Kim <[email protected]>

---------

Signed-off-by: Matthew Kim <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants