googleapis / googleapis/google-cloud-java

[java-storage] Getting both Metadata and Content with a Single request

未关闭
#12,636 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: storage type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

I might be wrong but looking at our distributed traces, it seems following code will send two GET (JSON API) requests to `stogare.googleapis.com`

```
Blob blob = storage.get(blobId);
byte[] content = blob.getContent();
```

Is there a way to get both the content and (some) metadata with a single request? There's `Storage.readAllBytes` but it does not return metadata.
We are specifically interested in `Content-Encoding`, `Content-Type` and a few other standard headers (`Cache-Control`, `Content-Length`, etc).

We have millions of small objects, and it'd be great if we can cut both the latency and the cost by half.

贡献指南

打开贡献指南

调研方向

首先检查 Java Storage.get(blobId) 和 Storage.readAllBytes API,以及 issue 中描述的底层 JSON API 请求。确定单个请求是否可以同时返回内容以及 Content-Encoding、Content-Type、Cache-Control 和 Content-Length。对于所请求的元数据,如果受支持的 API 行为已通过单个请求完成文档记录或实现并经过验证,则视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
gcp, java
领域
api, cloud
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。