-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert WriteFiles/FileBasedSink from IOChannelFactory to FileSystems
This converts FileBasedSink from IOChannelFactory to FileSystems, with fallout changes on all existing Transforms that use WriteFiles. We preserve the existing semantics of most transforms, simply adding the ability for users to provide ResourceId in addition to String when setting the outputPrefix. Other changes: * Make DefaultFilenamePolicy its own top-level class and move IOChannelUtils#constructName into it. This the default FilenamePolicy used by FilebasedSource. * Rethink FilenamePolicy as a function from ResourceId (base directory) to ResourceId (output file), moving the base directory into the context. This way, FilenamePolicy logic is truly independent from the base directory. Using ResourceId#resolve, a filename policy can add multiple path components, say, base/YYYY/MM/DD/file.txt, in a fileystem independent way. (Also add an optional extension parameter to the function, enabling an owning transform to pass in the suffix from a separately-configured compression factory or similar.) * Remove some old logic disallowing certain specific patterns of filenames that dates back to Cloud Dataflow SDKs on no-longer-used implementations.
- Loading branch information
Showing
27 changed files
with
1,286 additions
and
1,378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.