apache / apache/beam

Obtain metadata field at once in file system's IO connectors

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

Description

This tasks involves refactoring and improvements of IO connectors' file metadata related methods (GcsIO, S3IO, BlobIO, hadoop).

Currently, we have individual methods like size, last_updated, checksum, and others. Each one would make a HTTP request in order to get the specific metadata field. If one needs to gather multiple metadata fields, then every specific method are called and making multiple requests under the hood. Actually, the HTTP response contains multiple file metadata fields but each time only one field is collected and others are discarded.

We should have a public method that returns a named tuple which contains multiple file metadata fields. In its implementation it only makes one request, as existing methods for single metadata field. 

 

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

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.