beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [15/50] [abbrv] beam git commit: Add javadoc to getCheckpointMark in UnboundedSource
Date Tue, 25 Apr 2017 17:30:10 GMT
Add javadoc to getCheckpointMark in UnboundedSource


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c62d698f
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c62d698f
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c62d698f

Branch: refs/heads/jstorm-runner
Commit: c62d698f52cab716f226ca4aec40718bf851a14c
Parents: f7d727c
Author: wtanaka.com <wtanaka@yahoo.com>
Authored: Sun Apr 2 23:02:00 2017 -1000
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Apr 17 09:49:49 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/beam/sdk/io/UnboundedSource.java   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/c62d698f/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
index 3f1ba0e..cc1f598 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
@@ -220,6 +220,19 @@ public abstract class UnboundedSource<
     /**
      * Returns a {@link CheckpointMark} representing the progress of this {@code UnboundedReader}.
      *
+     * <p>If this {@code UnboundedReader} does not support checkpoints, it may return
a
+     * CheckpointMark which does nothing, like:
+     *
+     * <pre>{@code
+     * public UnboundedSource.CheckpointMark getCheckpointMark() {
+     *   return new UnboundedSource.CheckpointMark() {
+     *     public void finalizeCheckpoint() throws IOException {
+     *       // nothing to do
+     *     }
+     *   };
+     * }
+     * }</pre>
+     *
      * <p>All elements read up until this method is called will be processed together
as a bundle.
      * (An element is considered 'read' if it could be returned by a call to {@link #getCurrent}.)
      * Once the result of processing those elements and the returned checkpoint have been
durably


Mime
View raw message