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:13 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d0e7c6b93 -> 7c58351e9


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


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

Branch: refs/heads/trunk
Commit: 7c58351e9e7d109a54dfa319437ca5f891164e5b
Parents: d0e7c6b
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:02 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/7c58351e/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 68f0719..5bc8a42 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/7c58351e/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 1472d74..5546000 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
@@ -51,7 +51,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