diff --git a/docs/streams/developer-guide/dsl-api.html b/docs/streams/developer-guide/dsl-api.html index 9c7be8b4039..ae03899043a 100644 --- a/docs/streams/developer-guide/dsl-api.html +++ b/docs/streams/developer-guide/dsl-api.html @@ -55,8 +55,8 @@
Tumbling time windows 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.
-Tumbling time windows are aligned to the epoch, with the lower interval bound being inclusive and the upper bound
- being exclusive. “Aligned to the epoch” means that the first window starts at timestamp zero. For example, tumbling
- windows with a size of 5000ms have predictable window boundaries [0;5000),[5000;10000),...
— and not
- [1000;6000),[6000;11000),...
or even something “random” like [1452;6452),[6452;11452),...
.
The following code defines a tumbling window with a size of 5 minutes:
-import java.time.Duration;
-import org.apache.kafka.streams.kstream.TimeWindows;
-
-// A tumbling time window with a size of 5 minutes (and, by definition, an implicit
-// advance interval of 5 minutes).
-Duration windowSizeMs = Duration.ofMinutes(5);
-TimeWindows.of(windowSizeMs);
-
-// The above is equivalent to the following code:
-TimeWindows.of(windowSizeMs).advanceBy(windowSizeMs);
-
Hopping time windows are windows based on time intervals. They model fixed-sized, (possibly) overlapping windows. @@ -3271,6 +3238,39 @@ milliseconds (e.g. t=5 would become t=300,000).
corresponding window instance and the embedded key can be retrieved asWindowed#window()
and Windowed#key()
,
respectively.
Tumbling time windows 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.
+Tumbling time windows are aligned to the epoch, with the lower interval bound being inclusive and the upper bound
+ being exclusive. “Aligned to the epoch” means that the first window starts at timestamp zero. For example, tumbling
+ windows with a size of 5000ms have predictable window boundaries [0;5000),[5000;10000),...
— and not
+ [1000;6000),[6000;11000),...
or even something “random” like [1452;6452),[6452;11452),...
.
The following code defines a tumbling window with a size of 5 minutes:
+import java.time.Duration;
+import org.apache.kafka.streams.kstream.TimeWindows;
+
+// A tumbling time window with a size of 5 minutes (and, by definition, an implicit
+// advance interval of 5 minutes).
+Duration windowSizeMs = Duration.ofMinutes(5);
+TimeWindows.of(windowSizeMs);
+
+// The above is equivalent to the following code:
+TimeWindows.of(windowSizeMs).advanceBy(windowSizeMs);
+
Sliding windows are actually quite different from hopping and tumbling windows. In Kafka Streams, sliding windows