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

feat: Add "transfer_manager" module for concurrent uploads and downloads, as a preview feature #943

Merged
merged 19 commits into from Dec 6, 2022

Conversation

andrewsg
Copy link
Contributor

@andrewsg andrewsg commented Dec 6, 2022

This PR adds a "transfer_manager" module which enables concurrent downloads and uploads of multiple files via the use of a thread pool. Transfer Manager is a preview feature and the API and behavior are subject to change before a GA launch of the feature in the future. A warning is emitted on import to this effect. Please do not hesitate to submit bugs and general feedback, positive or negative, by opening a github issue.

The performance of this feature is sensitive to the value of the "threads" parameter and the specifics of the environment and workload. Read the docstrings on "threads" and experiment to find what works best for each use case.

@andrewsg andrewsg requested review from a team as code owners December 6, 2022 19:44
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/python-storage API. labels Dec 6, 2022
@andrewsg andrewsg changed the title feat: Add "transfer_manager" module preview feature feat: Add "transfer_manager" module for concurrent uploads and downloads, as a preview feature Dec 6, 2022
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

Just a nit; thanks for addressing the comments from yesterday's discussion.

# limitations under the License.


def upload_many_blobs_with_transfer_manager(
Copy link
Member

Choose a reason for hiding this comment

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

After this PR / release can you split these samples into respective files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

samples/snippets/storage_transfer_manager.py Outdated Show resolved Hide resolved
from google.api_core import exceptions


def test_upload_many(shared_bucket, file_data, blobs_to_delete):
Copy link
Member

Choose a reason for hiding this comment

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

In a subsequent PR please add a file object of 16mib range so it tests resumable upload code path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants