apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chandnisingh <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: Checkpoint notification to notif...
Date Fri, 18 Dec 2015 00:01:03 GMT
Github user chandnisingh 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 --
    @PramodSSImmaneni I think window id is important here for consistency with Checkpointed
callback as well.  With checkpointing an operator's state is saved with respect to window
id. The operator is informed before checkpointing state in reference to a window id and when
it is done, that checkpointed callback is triggered. 

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