Repository: kafka
Updated Branches:
  refs/heads/trunk 2e1b00f26 -> abe5e0e48


MINOR: add session windows doc to streams.html

Author: Damian Guy <[email protected]>

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

Closes #2547 from dguy/session-window-doc


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

Branch: refs/heads/trunk
Commit: abe5e0e489a1d93867098da8d472060055b31b72
Parents: 2e1b00f
Author: Damian Guy <[email protected]>
Authored: Wed Feb 15 16:39:52 2017 -0800
Committer: Guozhang Wang <[email protected]>
Committed: Wed Feb 15 16:39:52 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/abe5e0e4/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>

Reply via email to