From 86353dce8a5217ba4ba4ae4b863578803232b3bc Mon Sep 17 00:00:00 2001 From: Damian Guy Date: Wed, 5 Apr 2017 11:42:17 +0100 Subject: [PATCH 1/2] update javadoc on readonly window store --- .../streams/state/ReadOnlyWindowStore.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java index 3606c570fd834..85361bddd6e25 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java @@ -32,7 +32,26 @@ public interface ReadOnlyWindowStore { /** * Get all the key-value pairs with the given key and the time range from all * the existing windows. - * + *

+ * The time range is inclusive and applies to the starting timestamp of the window. + * For example, if we have the following windows: + *

+ *

+     * +-------------------------------+
+     * |  key  | start time | end time |
+     * +-------+------------+----------+
+     * |   A   |     10     |    20    |
+     * +-------+------------+----------+
+     * |   A   |     15     |    25    |
+     * +-------+------------+----------+
+     * |   A   |     20     |    30    |
+     * +-------+------------+----------+
+     * |   A   |     25     |    35    |
+     * +--------------------------------
+     * 
+ * And we called {@code store.fetch("A", 10, 20)} then the results will contain the first + * three windows from the table above, i.e., all those were start time >= 10 and <= 20. + * * @return an iterator over key-value pairs {@code } * @throws InvalidStateStoreException if the store is not initialized */ From 386f95382c1ae0513dc4be6e16d52944e8657072 Mon Sep 17 00:00:00 2001 From: Damian Guy Date: Thu, 6 Apr 2017 14:33:40 +0100 Subject: [PATCH 2/2] comments --- .../org/apache/kafka/streams/state/ReadOnlyWindowStore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java index 85361bddd6e25..1472d74ed60ed 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java @@ -49,8 +49,8 @@ public interface ReadOnlyWindowStore { * | A | 25 | 35 | * +-------------------------------- * - * And we called {@code store.fetch("A", 10, 20)} then the results will contain the first - * three windows from the table above, i.e., all those were start time >= 10 and <= 20. + * And we call {@code store.fetch("A", 10, 20)} then the results will contain the first + * three windows from the table above, i.e., all those where 10 <= start time <= 20. * * @return an iterator over key-value pairs {@code } * @throws InvalidStateStoreException if the store is not initialized