apache / apache/beam

FileSystem.create does not pass full Metadata to GCS

Open
#21,046 0 comments 0 reactions 0 assignees View on GitHub
gcp improvement io P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

When I call *FileSystem.create(foo, mime_type="text/plain", compression_type=CompressionTypes.BZIP2)* I would expect the following metadata set on GCS Blob:
bq. content_type: text/plain
bq. content_encoding: application/bzip2

What we currently get is:
bq. content_type: application/x-bz2

Looking at the code it seems to be a problem with GcsIO interface, which does not seem to expose *content_type* and *content_encoding* properly.

Imported from Jira [BEAM-12714](https://issues.apache.org/jira/browse/BEAM-12714). Original Jira may contain additional context.
Reported by: abergmeier.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.