GitHub user jeffkpayne opened a pull request:

    https://github.com/apache/incubator-beam/pull/1027

    [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](https://www.apache.org/licenses/icla.txt).
    
    Thanks!

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

    $ git pull https://github.com/bomboradata/incubator-beam 
decorated-file-sink-gzip-support

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

    https://github.com/apache/incubator-beam/pull/1027.patch

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 <[email protected]>
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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to