gcloud storage python客户端API是否支持并行复合上传? [英] Does gcloud storage python client API support parallel composite upload?
问题描述
gsutil
命令具有用于优化大型文件的上载/下载速度的选项.例如
The gsutil
command has options to optimize upload/download speed for large files. For example
GSUtil:parallel_composite_upload_threshold=150M
GSUtil:sliced_object_download_max_components=8
请参见此页面以供参考.
google.cloud.storage
python API中的等效项是什么?我没有在此文档.
What is the equivalence in the google.cloud.storage
python API? I didn't find the relevant parameters in this document.
通常,客户端API和 gsutil
在功能方面是否具有一对一的对应关系?
In general, does the client API and gsutil
have one to one correspondence in terms of functionalities?
推荐答案
我认为它本身不受支持.
I think it's not natively supported.
但是(!)如果您愿意分解文件,然后使用 threading
或 multiprocessing
,则有一个
However (!) if you're willing to decompose files then use threading
or multiprocessing
, there is a compose
method that should help you assemble the parts into one GCS object.
具有讽刺意味的是, gsutil
是用Python编写的,但它使用的库
Ironically, gsutil
is written in Python but it uses a library gslib
to implement parallel uploads. You may be able to use gslib
as a template.
这篇关于gcloud storage python客户端API是否支持并行复合上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!