googleapis / googleapis/google-cloud-java

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

Abierto
#12,636 2 comentarios 0 reacciones 0 asignados Ver en GitHub
api: storage type: feature request
Lenguaje dominante
Java
Estrellas
2.1k
Forks
1.2k
Merge medio
1 d 23 h
PR fusionados (30 d)
154

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.