java - 如何在 Google Cloud Storage 中上传批量对象?
问题描述
我正在使用 Google Cloud Storage 和 Java,我需要将 1000 个对象批量上传到 GCS。
这是 GCS 提供的文档
Storage storage = StorageOptions.getDefaultInstance().getService();
BlobId blobId = BlobId.of("bucket", "blob_name");
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build();
Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
但它只适用于一个对象,我正在寻找一个批处理函数但我没有找到它,因此我必须使用 for 逐个对象上传对象。
解决方案
还没有。您可以在此处阅读有关现有积压功能请求的信息:https ://github.com/googleapis/google-cloud-java/issues/2351
推荐阅读
- vbscript - UFT 不会根据相邻文本单击单选按钮
- excel - 如何使用 VBA 宏将特定列(第 2 列)从多个工作表(1,2,3...n)自动提取到一个主工作表。你能帮我下面吗
- amazon-web-services - 列出所有正在运行的 EC2 实例,没有任何快照
- javascript - 如何在 React 中使用不断变化的道具呈现数据点列表?
- html - 将整个 HTML 主题转换为当前的 WordPress
- javascript - TypeError: t 不是函数 - React
- mysql - MySQL 无法启动服务器
- python - 我如何使用泛型 API 视图获取带有 url 的图像位置以响应 django rest 框架
- android - 如何单击底部栏上的图标
- html - element.style 的连字符属性键的使用