kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Document ordering contract of iterator for window stores and session stores
Date Tue, 11 Apr 2017 08:50:49 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.2 629ee94d2 -> 2adaa50f5


MINOR: Document ordering contract of iterator for window stores and session stores

Author: Michael G. Noll <michael@confluent.io>

Reviewers: Damian Guy <damian.guy@gmail.com>, Ismael Juma <ismael@juma.me.uk>

Closes #2751 from miguno/trunk-streams-window-iterator-doc-fixes

(cherry picked from commit 7c58351e9e7d109a54dfa319437ca5f891164e5b)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>


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

Branch: refs/heads/0.10.2
Commit: 2adaa50f552b38eac36ead8bd559a7581e7ff81f
Parents: 629ee94
Author: Michael G. Noll <michael@confluent.io>
Authored: Tue Apr 11 09:50:02 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Tue Apr 11 09:50:22 2017 +0100

----------------------------------------------------------------------
 .../org/apache/kafka/streams/state/ReadOnlySessionStore.java    | 4 ++++
 .../org/apache/kafka/streams/state/ReadOnlyWindowStore.java     | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/2adaa50f/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlySessionStore.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlySessionStore.java
b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlySessionStore.java
index f09d357..0f22b34 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlySessionStore.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlySessionStore.java
@@ -33,6 +33,10 @@ public interface ReadOnlySessionStore<K, AGG> {
 
     /**
      * Retrieve all aggregated sessions for the provided key
+     *
+     * For each key, the iterator guarantees ordering of sessions, starting from the oldest/earliest
+     * available session to the newest/latest session.
+     *
      * @param    key record key to find aggregated session values for
      * @return   KeyValueIterator containing all sessions for the provided key.
      */

http://git-wip-us.apache.org/repos/asf/kafka/blob/2adaa50f/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java
----------------------------------------------------------------------
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 4f9b78a..ff65f16 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,7 +49,10 @@ public interface ReadOnlyWindowStore<K, V> {
      * </pre>
      * 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.
-     * 
+     * <p>
+     * For each key, the iterator guarantees ordering of windows, starting from the oldest/earliest
+     * available window to the newest/latest window.
+     *
      * @return an iterator over key-value pairs {@code <timestamp, value>}
      * @throws InvalidStateStoreException if the store is not initialized
      */


Mime
View raw message