You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ke...@apache.org on 2016/07/20 17:40:24 UTC
[1/2] incubator-beam git commit: Add withAllowedLateness with Closing
Behavior to Window
Repository: incubator-beam
Updated Branches:
refs/heads/master 6d7efe3df -> f547f70e1
Add withAllowedLateness with Closing Behavior to Window
This makes the static constructors for withAllowedLateness symmetric to
the PTransform builder methods. It also allows references to
Window#withAllowedLateness(Duration, ClosingBehavior).
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/5f19e4ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/5f19e4ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/5f19e4ca
Branch: refs/heads/master
Commit: 5f19e4caf207ff02d226fec2933be2f37ca66b4d
Parents: c4ad118
Author: Thomas Groh <tg...@google.com>
Authored: Thu Jun 30 10:06:52 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Wed Jul 20 10:39:51 2016 -0700
----------------------------------------------------------------------
.../beam/sdk/transforms/windowing/Window.java | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5f19e4ca/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java
index bc122e2..fe8b66f 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Window.java
@@ -209,7 +209,8 @@ public class Window {
}
/**
- * Override the amount of lateness allowed for data elements in the pipeline. Like
+ * Override the amount of lateness allowed for data elements in the output {@link PCollection},
+ * and downstream {@link PCollection PCollections} until explicitly set again. Like
* the other properties on this {@link Window} operation, this will be applied at
* the next {@link GroupByKey}. Any elements that are later than this as decided by
* the system-maintained watermark will be dropped.
@@ -224,6 +225,23 @@ public class Window {
}
/**
+ * Override the amount of lateness allowed for data elements in the output {@link PCollection},
+ * and downstream {@link PCollection PCollections} until explicitly set again. Like
+ * the other properties on this {@link Window} operation, this will be applied at
+ * the next {@link GroupByKey}. Any elements that are later than this as decided by
+ * the system-maintained watermark will be dropped.
+ *
+ * <p>This value also determines how long state will be kept around for old windows.
+ * Once no elements will be added to a window (because this duration has passed) any state
+ * associated with the window will be cleaned up.
+ */
+ @Experimental(Kind.TRIGGER)
+ public static <T> Bound<T> withAllowedLateness(
+ Duration allowedLateness, ClosingBehavior closingBehavior) {
+ return new Unbound().withAllowedLateness(allowedLateness, closingBehavior);
+ }
+
+ /**
* An incomplete {@code Window} transform, with unbound input/output type.
*
* <p>Before being applied, {@link Window.Unbound#into} must be
[2/2] incubator-beam git commit: This closes #567
Posted by ke...@apache.org.
This closes #567
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/f547f70e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/f547f70e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/f547f70e
Branch: refs/heads/master
Commit: f547f70e1c9535ff663d124f67c72c7ec2c55e9e
Parents: 6d7efe3 5f19e4c
Author: Kenneth Knowles <kl...@google.com>
Authored: Wed Jul 20 10:40:13 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Wed Jul 20 10:40:13 2016 -0700
----------------------------------------------------------------------
.../beam/sdk/transforms/windowing/Window.java | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------