You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tg...@apache.org on 2017/04/24 18:07:19 UTC

[1/2] beam git commit: This closes #2626

Repository: beam
Updated Branches:
  refs/heads/master f8d616816 -> 2cf68730c


This closes #2626


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

Branch: refs/heads/master
Commit: 2cf68730cf56cb0fbe3e8df8713cf71e7a841c61
Parents: f8d6168 14a8590
Author: Thomas Groh <tg...@google.com>
Authored: Mon Apr 24 11:05:26 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Apr 24 11:05:26 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/core/StateNamespaces.java  | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/2] beam git commit: Use Structural Value when comparing Window(AndTrigger) Namespaces

Posted by tg...@apache.org.
Use Structural Value when comparing Window(AndTrigger) Namespaces

This makes sure we don't use a potentially default equals method and
instead compare based on the Coder, which is how Beam defines equality.


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

Branch: refs/heads/master
Commit: 14a859070b10329027d86393bd36a65812b7446e
Parents: f8d6168
Author: Thomas Groh <tg...@google.com>
Authored: Thu Apr 20 20:00:55 2017 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Mon Apr 24 11:05:26 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/core/StateNamespaces.java  | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/14a85907/runners/core-java/src/main/java/org/apache/beam/runners/core/StateNamespaces.java
----------------------------------------------------------------------
diff --git a/runners/core-java/src/main/java/org/apache/beam/runners/core/StateNamespaces.java b/runners/core-java/src/main/java/org/apache/beam/runners/core/StateNamespaces.java
index e13c912..481aff9 100644
--- a/runners/core-java/src/main/java/org/apache/beam/runners/core/StateNamespaces.java
+++ b/runners/core-java/src/main/java/org/apache/beam/runners/core/StateNamespaces.java
@@ -142,7 +142,12 @@ public class StateNamespaces {
       }
 
       WindowNamespace<?> that = (WindowNamespace<?>) obj;
-      return Objects.equals(this.window, that.window);
+      return Objects.equals(
+          this.windowStructuralValue(), that.windowStructuralValue());
+    }
+
+    private Object windowStructuralValue() {
+      return windowCoder.structuralValue(window);
     }
 
     @Override
@@ -223,7 +228,11 @@ public class StateNamespaces {
 
       WindowAndTriggerNamespace<?> that = (WindowAndTriggerNamespace<?>) obj;
       return this.triggerIndex == that.triggerIndex
-          && Objects.equals(this.window, that.window);
+          && Objects.equals(this.windowStructuralValue(), that.windowStructuralValue());
+    }
+
+    private Object windowStructuralValue() {
+      return windowCoder.structuralValue(window);
     }
 
     @Override