kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-3658: Validate retention period be longer than window size
Date Mon, 09 May 2016 16:31:25 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 1142f51bf -> 2a1b3b93b


KAFKA-3658: Validate retention period be longer than window size

Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Henry Cai, Ismael Juma

Closes #1337 from guozhangwang/K3658

(cherry picked from commit 29a682e2ea1918b50c6fd4c36ce399242929e5ae)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.10.0
Commit: 2a1b3b93b661a00055878948023d5b3901e18621
Parents: 1142f51
Author: Guozhang Wang <wangguoz@gmail.com>
Authored: Mon May 9 09:31:11 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Mon May 9 09:31:20 2016 -0700

----------------------------------------------------------------------
 .../kafka/streams/kstream/internals/KStreamJoinWindow.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/2a1b3b93/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamJoinWindow.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamJoinWindow.java
b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamJoinWindow.java
index 864dc9c..2f4b04d 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamJoinWindow.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamJoinWindow.java
@@ -34,9 +34,9 @@ class KStreamJoinWindow<K, V> implements ProcessorSupplier<K, V>
{
     KStreamJoinWindow(String windowName, long windowSizeMs, long retentionPeriodMs) {
         this.windowName = windowName;
 
-        if (windowSizeMs * 2 > retentionPeriodMs)
+        if (windowSizeMs > retentionPeriodMs)
             throw new TopologyBuilderException("The retention period of the join window "
-                    + windowName + " must at least two times its window size.");
+                    + windowName + " must be no smaller than its window size.");
     }
 
     @Override


Mime
View raw message