kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mj...@apache.org
Subject [kafka] branch trunk updated: KAFKA-6453: Document how timestamps are computed for aggregations and joins (#9009)
Date Mon, 13 Jul 2020 22:02:16 GMT
This is an automated email from the ASF dual-hosted git repository.

mjsax 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 d945b28  KAFKA-6453: Document how timestamps are computed for aggregations and joins
(#9009)
d945b28 is described below

commit d945b287ff694394449826d01ae238cf7e53a5f1
Author: Jim Galasyn <jim.galasyn@confluent.io>
AuthorDate: Mon Jul 13 15:01:14 2020 -0700

    KAFKA-6453: Document how timestamps are computed for aggregations and joins (#9009)
    
    Reviewer: Matthias J. Sax <matthias@confluent.io>
---
 docs/streams/core-concepts.html | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/docs/streams/core-concepts.html b/docs/streams/core-concepts.html
index 3381a12..cdb9fc1 100644
--- a/docs/streams/core-concepts.html
+++ b/docs/streams/core-concepts.html
@@ -128,7 +128,33 @@
     </ul>
 
     <p>
-	Note, that the describe default behavior can be changed in the Processor API by assigning
timestamps to output records explicitly when calling <code>#forward()</code>.
+        You can change the default behavior in the Processor API by assigning
+        timestamps to output records explicitly when calling <code>#forward()</code>.
+    </p>
+
+    <p>
+        For aggregations and joins, timestamps are computed by using the
+        following rules. 
+    </p>
+
+    <p>
+        <ul>
+            <li>For joins (stream-stream, table-table) that have left and right
+                input records, the timestamp of the output record is assigned
+                <code>max(left.ts, right.ts)</code>.</li>
+            <li>For stream-table joins, the output record is assigned the timestamp
+                from the stream record.</li>
+            <li>For aggregations, Kafka Streams also computes the <code>max</code>
+                timestamp over all records, per key, either globally (for non-windowed)
+                or per-window.</li>
+            <li>For stateless operations, the input record timestamp is passed through.
+                For <code>flatMap</code> and siblings that emit multiple records,
all
+                output records inherit the timestamp from the corresponding input record.</li>
+        </ul>
+    </p>
+    
+    <p>
+
     </p>
 
     <h3><a id="streams_concepts_duality" href="#streams-concepts-duality">Duality
of Streams and Tables</a></h3>


Mime
View raw message