kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: add session windows doc to streams.html
Date Thu, 16 Feb 2017 00:40:14 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.2 f6d07e206 -> 167d5a33f


MINOR: add session windows doc to streams.html

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Michael G. Noll, Matthias J. Sax, Guozhang Wang

Closes #2547 from dguy/session-window-doc

(cherry picked from commit abe5e0e489a1d93867098da8d472060055b31b72)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.10.2
Commit: 167d5a33fd05bbd281ee2afc56b0b1f70ffaf7fe
Parents: f6d07e2
Author: Damian Guy <damian.guy@gmail.com>
Authored: Wed Feb 15 16:39:52 2017 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Feb 15 16:40:07 2017 -0800

----------------------------------------------------------------------
 docs/streams.html | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/167d5a33/docs/streams.html
----------------------------------------------------------------------
diff --git a/docs/streams.html b/docs/streams.html
index 31bae5d..d9afee8 100644
--- a/docs/streams.html
+++ b/docs/streams.html
@@ -539,6 +539,13 @@
         <li><b>Hopping time windows</b> are windows based on time intervals.
They model fixed-sized, (possibly) overlapping windows. A hopping window is defined by two
properties: the window's size and its advance interval (aka "hop"). The advance interval specifies
by how much a window moves forward relative to the previous one. For example, you can configure
a hopping window with a size 5 minutes and an advance interval of 1 minute. Since hopping
windows can overlap a data record may belong to more than one such windows.</li>
         <li><b>Tumbling time windows</b> are a special case of hopping
time windows and, like the latter, are windows based on time intervals. They model fixed-size,
non-overlapping, gap-less windows. A tumbling window is defined by a single property: the
window's size. A tumbling window is a hopping window whose window size is equal to its advance
interval. Since tumbling windows never overlap, a data record will belong to one and only
one window.</li>
         <li><b>Sliding windows</b> model a fixed-size window that slides
continuously over the time axis; here, two data records are said to be included in the same
window if the difference of their timestamps is within the window size. Thus, sliding windows
are not aligned to the epoch, but on the data record timestamps. In Kafka Streams, sliding
windows are used only for join operations, and can be specified through the <code>JoinWindows</code>
class.</li>
+        <li><b>Session windows</b> are used to aggregate key-based events
into sessions.
+            Sessions represent a period of activity separated by a defined gap of inactivity.
+            Any events processed that fall within the inactivity gap of any existing sessions
are merged into the existing sessions.
+            If the event falls outside of the session gap, then a new session will be created.
+            Session windows are tracked independently across keys (e.g. windows of different
keys typically have different start and end times) and their sizes vary (even windows for
the same key typically have different sizes);
+            as such session windows can't be pre-computed and are instead derived from analyzing
the timestamps of the data records.
+        </li>
         </ul>
 
         <p>


Mime
View raw message