GitHub user dhalperi opened a pull request:

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

    [BEAM-292] Write: always produce at least 1 WriteT

    Write has a degenerate case wherein, if no elements were in the written 
PCollection,
    the finalize step will get produced with nothing to finalize. This often 
prevents
    correct operation, for example when a FileBasedSink produces no files 
instead of one
    empty file.
    
    Catch and handle this case in Write by opening and closing an empty Writer 
to
    produce a single WriteT.

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

    $ git pull https://github.com/dhalperi/incubator-beam write-numshards

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

    https://github.com/apache/incubator-beam/pull/424.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 #424
    
----
commit 2cd79b6c760ed6aeae41a9b69bc628cd72a4ac2d
Author: Dan Halperin <dhalp...@google.com>
Date:   2016-06-07T04:46:37Z

    [BEAM-292] Write: always produce at least 1 WriteT
    
    Write has a degenerate case wherein, if no elements were in the written 
PCollection,
    the finalize step will get produced with nothing to finalize. This often 
prevents
    correct operation, for example when a FileBasedSink produces no files 
instead of one
    empty file.
    
    Fix this in Write by opening and closing an empty Writer to produce a single
    Write.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to