apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PramodSSImmaneni <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: Checkpoint notification to notif...
Date Thu, 17 Dec 2015 23:29:39 GMT
Github user PramodSSImmaneni 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 --
    @chandnisingh good point. However can you think of a use case where you would need to
identify more than one set of state slices between checkpoints distinctly at the same time.
If that is not the case and the old slices are cleaned up then we can reuse the same windowId
from beginWindow to identify all of them.

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