GitHub user joshfg opened a pull request:

    https://github.com/apache/flink/pull/2269

    [FLINK-4190] Generalise RollingSink to work with arbitrary buckets

    I've created a new bucketing package with a BucketingSink, which improves 
on the existing RollingSink by enabling arbitrary bucketing, rather than just 
rolling files based on system time.
    
    The main changes to support this are:
    
    - The Bucketer interface now takes the sink's input element as a generic 
parameter, enabling us to bucket based on attributes of the sink's input.
    - While maintaining the same rolling mechanics of the existing 
implementation (e.g. rolling when the file size reaches a threshold), the sink 
implementation can now have many 'active' buckets at any point in time. The 
checkpointing mechanics have been extended to support maintaining the state of 
multiple active buckets and files, instead of just one.
    - For use cases where the buckets being written to are changing over time, 
the sink now needs to determine when a bucket has become 'inactive', in order 
to flush and close the file. In the existing implementation, this is simply 
when the bucket path changes. Instead, we now determine a bucket as inactive if 
it hasn't been written to recently. To support this there are two additional 
user configurable settings: inactiveBucketCheckInterval and 
inactiveBucketThreshold.

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

    $ git pull https://github.com/joshfg/flink flink-4190

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

    https://github.com/apache/flink/pull/2269.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 #2269
    
----
commit 2011e47de6c8b3c087772c84b4b3e44210dbe50c
Author: Josh <joshformangorn...@gmail.com>
Date:   2016-07-12T17:38:54Z

    [FLINK-4190] Generalise RollingSink to work with arbitrary buckets

----


---
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