You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2016/07/06 17:20:37 UTC

[31/50] [abbrv] incubator-beam git commit: Deprecate WindowedValue.valueInEmptyWindows

Deprecate WindowedValue.valueInEmptyWindows


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

Branch: refs/heads/runners-spark2
Commit: 1779bf88d42738c4a39502d0df995b8421ecf4c8
Parents: 9f79e2b
Author: Kenneth Knowles <kl...@google.com>
Authored: Wed Jun 22 07:44:45 2016 -0700
Committer: Luke Cwik <lc...@google.com>
Committed: Wed Jul 6 10:18:52 2016 -0700

----------------------------------------------------------------------
 .../org/apache/beam/sdk/util/WindowedValue.java   | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1779bf88/sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java
index d21b6c8..676848c 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java
@@ -130,7 +130,11 @@ public abstract class WindowedValue<T> {
   /**
    * Returns a {@code WindowedValue} with the given value in no windows, and the default timestamp
    * and pane.
+   *
+   * @deprecated a value in no windows technically is not "in" a PCollection. It is allowed to drop
+   *     it at any point, and benign runner implementation details could cause silent data loss.
    */
+  @Deprecated
   public static <T> WindowedValue<T> valueInEmptyWindows(T value) {
     return new ValueInEmptyWindows<T>(value, PaneInfo.NO_FIRING);
   }
@@ -138,7 +142,11 @@ public abstract class WindowedValue<T> {
   /**
    * Returns a {@code WindowedValue} with the given value in no windows, and the default timestamp
    * and the specified pane.
+   *
+   * @deprecated a value in no windows technically is not "in" a PCollection. It is allowed to drop
+   *     it at any point, and benign runner implementation details could cause silent data loss.
    */
+  @Deprecated
   public static <T> WindowedValue<T> valueInEmptyWindows(T value, PaneInfo pane) {
     return new ValueInEmptyWindows<T>(value, pane);
   }
@@ -295,11 +303,13 @@ public abstract class WindowedValue<T> {
   }
 
   /**
-   * The representation of a WindowedValue where timestamp == MIN and
-   * windows == {}.
+   * The representation of a WindowedValue where timestamp == MIN and windows == {}.
+   *
+   * @deprecated a value in no windows technically is not "in" a PCollection. It is allowed to drop
+   *     it at any point, and benign runner implementation details could cause silent data loss.
    */
-  private static class ValueInEmptyWindows<T>
-      extends MinTimestampWindowedValue<T> {
+  @Deprecated
+  private static class ValueInEmptyWindows<T> extends MinTimestampWindowedValue<T> {
     public ValueInEmptyWindows(T value, PaneInfo pane) {
       super(value, pane);
     }