beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [2/3] incubator-beam git commit: Deprecate WindowedValue.valueInEmptyWindows
Date Fri, 01 Jul 2016 02:51:43 GMT
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/81ad2a7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/81ad2a7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/81ad2a7b

Branch: refs/heads/master
Commit: 81ad2a7b0a25c1807804898cceb1e876c916c886
Parents: d835317
Author: Kenneth Knowles <klk@google.com>
Authored: Wed Jun 22 07:44:45 2016 -0700
Committer: Kenneth Knowles <klk@google.com>
Committed: Fri Jun 24 14:47:26 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/81ad2a7b/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 f63a0d4..58816fd 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
@@ -131,7 +131,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);
   }
@@ -139,7 +143,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);
   }
@@ -296,11 +304,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);
     }


Mime
View raw message