You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by vv...@apache.org on 2022/04/11 21:17:18 UTC

[kafka] branch trunk updated: MINOR: Fix SessionStore#fetchSession parameter names (#11999)

This is an automated email from the ASF dual-hosted git repository.

vvcephei pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0d518aaed1 MINOR: Fix SessionStore#fetchSession parameter names (#11999)
0d518aaed1 is described below

commit 0d518aaed158896ee9ee6949b8f38128d1d73634
Author: Jorge Esteban Quilcate Otoya <qu...@gmail.com>
AuthorDate: Mon Apr 11 22:17:01 2022 +0100

    MINOR: Fix SessionStore#fetchSession parameter names (#11999)
    
    Fixes a small copy/paste error from #10390 that changed the parameter names
    for fetchSession from the singular session form (eg `startTime`) to the range
    form (eg `earliestSessionStartTime`).
    
    Reviewers: John Roesler <vv...@apache.org>
---
 .../org/apache/kafka/streams/state/ReadOnlySessionStore.java |  8 ++++----
 .../java/org/apache/kafka/streams/state/SessionStore.java    | 12 +++++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)

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 4d44691992..7fe11a6bea 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
@@ -322,9 +322,9 @@ public interface ReadOnlySessionStore<K, AGG> {
     /**
      * Get the value of key from a single session.
      *
-     * @param key                    the key to fetch
+     * @param key              the key to fetch
      * @param sessionStartTime start timestamp of the session
-     * @param sessionEndTime end timestamp of the session
+     * @param sessionEndTime   end timestamp of the session
      * @return The value or {@code null} if no session with the exact start and end timestamp exists
      *         for the given key
      * @throws NullPointerException If {@code null} is used for any key.
@@ -339,9 +339,9 @@ public interface ReadOnlySessionStore<K, AGG> {
     /**
      * Get the value of key from a single session.
      *
-     * @param key                    the key to fetch
+     * @param key              the key to fetch
      * @param sessionStartTime start timestamp of the session
-     * @param sessionEndTime end timestamp of the session
+     * @param sessionEndTime   end timestamp of the session
      * @return The value or {@code null} if no session with the exact start and end timestamp exists
      *         for the given key
      * @throws NullPointerException If {@code null} is used for any key.
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/SessionStore.java b/streams/src/main/java/org/apache/kafka/streams/state/SessionStore.java
index 926cddc4d2..cbc1cc5b96 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/SessionStore.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/SessionStore.java
@@ -89,12 +89,14 @@ public interface SessionStore<K, AGG> extends StateStore, ReadOnlySessionStore<K
                 prepareMillisCheckFailMsgPrefix(latestSessionStartTime, "latestSessionStartTime")));
     }
 
-    default AGG fetchSession(final K key, final Instant earliestSessionEndTime, final Instant latestSessionStartTime) {
+    default AGG fetchSession(final K key,
+                             final Instant sessionStartTime,
+                             final Instant sessionEndTime) {
         return fetchSession(key,
-            ApiUtils.validateMillisecondInstant(earliestSessionEndTime,
-                prepareMillisCheckFailMsgPrefix(earliestSessionEndTime, "startTime")),
-            ApiUtils.validateMillisecondInstant(latestSessionStartTime,
-                prepareMillisCheckFailMsgPrefix(latestSessionStartTime, "endTime")));
+            ApiUtils.validateMillisecondInstant(sessionStartTime,
+                prepareMillisCheckFailMsgPrefix(sessionStartTime, "sessionStartTime")),
+            ApiUtils.validateMillisecondInstant(sessionEndTime,
+                prepareMillisCheckFailMsgPrefix(sessionEndTime, "sessionEndTime")));
     }
 
     /**