apache / apache/beam

FileBasedSource/IOChannelFactory: Custom glob expansion

Open
#17,978 0 comments 0 reactions 0 assignees View on GitHub
core java new feature P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

Many cloud and distributed filesystems are eventually consistent, for instance Amazon s3 and Google Cloud Storage.

To work around this, many systems that produce files such as Beam's FileBasedSinks, or Google BigQuery will provide methods to determine the number and set of files produced. E.g.,

* Beam FileBasedSink uses -00000-of-NNNNN
* BigQuery export jobs uses -000000 -000001 -000002 ... until an empty file is produced
* Another system may produce a .filelist suffix that contains a list of all files.

Users should be able to supply a glob to FileBasedSource but additionally supply a "glob expander" that can provide a custom implementation for file expansion. That way, e.g., Beam pipelines can be run back-to-back-to-back where each consumes the output of the previous, on an inconsistent filesystem, without data loss.

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

Contributor guide

Open the contributing guide

Research direction

Start by locating FileBasedSource and IOChannelFactory and reviewing how the current glob expansion works. Compare the requested custom expansion behavior with the Beam FileBasedSink and BigQuery export patterns described in the issue. Done means the requested caller-supplied expansion behavior is defined and supported for eventually consistent filesystems, with tests for its contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.