-
Notifications
You must be signed in to change notification settings - Fork 155
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
Conversation
* add samples, tests pending * add snippet tests * snippet and snippets_test.py linting * snippets; recursive directory creation; rename some params * Add directory upload snippet
There was a problem hiding this 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( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
from google.api_core import exceptions | ||
|
||
|
||
def test_upload_many(shared_bucket, file_data, blobs_to_delete): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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.