ableegoldman commented on a change in pull request #10926:
URL: https://github.com/apache/kafka/pull/10926#discussion_r659381726



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/TimeWindows.java
##########
@@ -83,16 +92,52 @@ private TimeWindows(final long sizeMs, final long 
advanceMs, final long graceMs)
      * Tumbling windows are a special case of hopping windows with {@code 
advance == size}.
      *
      * @param size The size of the window
-     * @return a new window definition with default maintain duration of 1 day
+     * @return a new window definition with default no grace period
+     * @throws IllegalArgumentException if the specified window size is zero 
or negative or can't be represented as {@code long milliseconds}
+     */
+    public static TimeWindows ofSizeWithNoGrace(final Duration size) throws 
IllegalArgumentException {

Review comment:
       In fact, since this and `ofSizeAndGrace` are pretty much the same thing 
-- differing only in the value of one config -- they should have the same 
javadocs completely. 
   
   Only the `@returns` and `@param` would be different. And maybe one sentence 
in each which says either `"this window definition allows you to specify the 
grace period"` or `"this window definition does not require setting the grace 
period, note that this means out-of-order data arriving after the window end 
will be dropped so think carefully about your requirements before using this in 
production"` --- or something like that




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to