beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-55) Allow users to compress FileBasedSink output files
Date Thu, 29 Sep 2016 20:55:20 GMT


ASF GitHub Bot commented on BEAM-55:

GitHub user jeffkpayne opened a pull request:

    [BEAM-55] Add abstract support for writing compressed/decorated/transformed files

    Essentially, this adds customizable file-based output support through DecoratedFileSink
and concrete Gzip file-based output support through WriterOutputGzipDecoratorFactory.  I realize
that the test coverage might be a little light for Apache Beam standards and have no problem
expanding that if needed.
    The DecoratedFileSink class provides a hook for decorating/transforming data output at
the WritableByteChannel/OutputStream level to enable things like Gzip compression during shard
file writes. I included a concrete implementation, WriterOutputGzipDecoratorFactory, of the
hook interface, which enables Gzip output, and is currently in use by us at Bombora. My thinking
was that a hook at this level would enable any file level transformation that could be done
via wrapping an OutputStream (as opposed to field or record level handled elsewhere in the
existing API).
    P.S. Not sure how large the PR needs to be to require an ICLA...
     - [x] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [x] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [x] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [?] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](

You can merge this pull request into a Git repository by running:

    $ git pull decorated-file-sink-gzip-support

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1027
commit 373ddd7b0884ce5d7702ebfb2288eea350e0d517
Author: Jeffrey Scott Keone Payne <>
Date:   2016-09-29T19:23:44Z

    [BEAM-55] Add customizable file-based output support through DecoratedFileSink and concrete
Gzip file-based output support through WriterOutputGzipDecoratorFactory


> Allow users to compress FileBasedSink output files
> --------------------------------------------------
>                 Key: BEAM-55
>                 URL:
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Daniel Halperin
>            Priority: Minor
> FileBasedSink (also TextIO.Write, AvroIO.Write, etc). does not have an option for compressing
its output.
> In general, we discourage compression because it limits or blocks scalably reading from
a file in parallel. However, users may want it -- so we should support the option (with appropriate

This message was sent by Atlassian JIRA

View raw message