apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tweise <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: Checkpoint notification to notif...
Date Thu, 17 Dec 2015 23:17:52 GMT
Github user tweise commented on a diff in the pull request:

    --- Diff: api/src/main/java/com/datatorrent/api/Operator.java ---
    @@ -270,4 +271,29 @@ public String toString()
    +  /**
    +   * Operators that need to be notified about checkpoint events should implement this
    +   *
    +   * The notification callbacks in this interface are called outside window boundaries
so the operators should not
    +   * attempt to send any tuples in these callbacks.
    +   *
    +   */
    +  public static interface CheckpointNotificationListener extends CheckpointListener
    +  {
    +    /**
    +     * Notify the operator that a checkpoint is about to be performed.
    +     *
    +     * Operators may need to perform certain tasks just before a checkpoint such as calling
flush on a stream. Having
    +     * this notification helps operators perform such operations optimally by doing them
once before checkpoint as
    +     * opposed to doing it repeatedly at the end of every window.
    +     *
    +     * The method will be called before the checkpoint is performed. It will be called
    +     * {@link Operator#endWindow()} call of the window preceding the checkpoint and before
the checkpoint is
    +     * actually performed.
    +     *
    +     * @param windowId The window id of the window preceding the checkpoint
    +     */
    +    public void checkpoint(long windowId);
    --- End diff --
    There will be cases where it is needed to slice the state by checkpoint for processing
in committed, but then this is the same situation as with endWindow and we should keep it

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

View raw message