You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ie...@apache.org on 2019/05/30 21:58:47 UTC

[beam] branch master updated: [BEAM-7341] Elements produced by bounded GBK are always ON_TIME and ONLY_FIRING

This is an automated email from the ASF dual-hosted git repository.

iemejia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new d43b12d  [BEAM-7341] Elements produced by bounded GBK are always ON_TIME and ONLY_FIRING
     new 51c59b2  Merge pull request #8618: [BEAM-7341] Elements produced by bounded GBK are always ON_TIME and ONLY_FIRING
d43b12d is described below

commit d43b12d96b6ebe1427ca8918a49ffd17b439b797
Author: David Moravek <da...@firma.seznam.cz>
AuthorDate: Mon May 20 09:54:59 2019 +0200

    [BEAM-7341] Elements produced by bounded GBK are always ON_TIME and ONLY_FIRING
---
 .../runners/spark/translation/GroupNonMergingWindowsFunctions.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupNonMergingWindowsFunctions.java b/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupNonMergingWindowsFunctions.java
index 2b35d2f..6f3a612 100644
--- a/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupNonMergingWindowsFunctions.java
+++ b/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupNonMergingWindowsFunctions.java
@@ -25,6 +25,7 @@ import org.apache.beam.runners.spark.coders.CoderHelpers;
 import org.apache.beam.sdk.coders.ByteArrayCoder;
 import org.apache.beam.sdk.coders.Coder;
 import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
+import org.apache.beam.sdk.transforms.windowing.PaneInfo;
 import org.apache.beam.sdk.util.WindowedValue;
 import org.apache.beam.sdk.util.WindowedValue.FullWindowedValueCoder;
 import org.apache.beam.sdk.values.KV;
@@ -198,7 +199,9 @@ public class GroupNonMergingWindowsFunctions {
                   windowingStrategy
                       .getWindowFn()
                       .getOutputTime(windowedValue.getTimestamp(), window));
-      return WindowedValue.of(KV.of(key, value), timestamp, window, windowedValue.getPane());
+      // BEAM-7341: Elements produced by GbK are always ON_TIME and ONLY_FIRING
+      return WindowedValue.of(
+          KV.of(key, value), timestamp, window, PaneInfo.ON_TIME_AND_ONLY_FIRING);
     }
   }