MINOR: rework JavaDoc for windowing related public API#2337
MINOR: rework JavaDoc for windowing related public API#2337mjsax wants to merge 2 commits intoapache:trunkfrom
Conversation
mjsax
commented
Jan 9, 2017
- also some code refactoring and bug fixes
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
test this please |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
729eee2 to
e2c6fda
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Test failures look legitimate. Looks like you will need to change the tests as the have |
e2c6fda to
60cfa8e
Compare
|
@dguy you are too fast :) About splitting code and docs update. It would be better (I did split out already SessionWindow PR), but hard to split up the rest now... (Did not expect to hit so many issues :( ) If you don't insist on it, I would rather keep it as is. Updated this. @enothereska @guozhangwang |
dguy
left a comment
There was a problem hiding this comment.
A few comments mostly about test naming. In general i think more descriptive test names are better.
Besides that my only other concerns are:
- this is +1000 lines and it is a MINOR PR.
- I already mentioned it is not just javadoc, but code changes.
I'm happy to defer to others judgement on both of those points.
There was a problem hiding this comment.
maybe rename to sth like: endTimeShouldNotBeBeforeStart
There was a problem hiding this comment.
i'd rename this to something more descriptive, too. Though i just realised this and the last haven't changed in this PR!
There was a problem hiding this comment.
What are we testing about until?
There was a problem hiding this comment.
Again i feel there is a more descriptive name for this test.
sth like: shouldUseWindowSizeForMaintainMsWhenSizeLargerThanDefaultMaintainMs
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
+1 on having separate PRs, ideally. |
60cfa8e to
e5c2d33
Compare
|
Updated this. @enothereska @dguy @guozhangwang |
| * Both values (before and after) must not result in an "inverse" window, | ||
| * i.e., lower-interval-bound must not be larger than upper-interval.bound. | ||
| * Both values (before and after) must not result in an "inverse" window, i.e., upper-interval-bound cannot be smaller | ||
| * than lower-interval bound. |
There was a problem hiding this comment.
do you want this to be "lower-interval-bound" to be consistent with "upper-interval-bound", or vice-versa?
| * Specifies that records of the same key are joinable if their timestamps are within | ||
| * the join window interval, and if the timestamp of a record from the secondary stream | ||
| * is later than or equal to the timestamp of a record from the first stream. | ||
| * Changes the end window boundary to {@code timeDifferenceMs} but keep the start window boundary as-is. |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
|
||
| /** | ||
| * Set the window maintain duration in milliseconds of streams time. | ||
| * Set the window maintain duration (retention time) in milliseconds. |
There was a problem hiding this comment.
Why do we need "duration" or "maintain" ? Can't we say just ...the window retention time...
There was a problem hiding this comment.
We have public method maintainMs() that returns retention time and I would like to mirror this connection in the JavaDocs. Or we rename the method to retentionMs(), but this would need a KIP. For now, I would leave it as is, but will put the renaming ides into the uber API KIP I am going to do.
Does this make sense?
| /** | ||
| * Specify the number of segments to be used for rolling the window store, | ||
| * this function is not exposed to users but can be called by developers that extend this JoinWindows specs. | ||
| * Return the window maintain duration (retention time) in milliseconds. |
|
Minor nits, otherwise LGTM, thanks @mjsax |
|
Refer to this link for build results (access rights to CI server needed): |
| * This implies, that each input record defines its own window with start and end time being relative to the record's | ||
| * timestamp. | ||
| * <p> | ||
| * For time semantics, compare {@link org.apache.kafka.streams.processor.TimestampExtractor TimestampExtractor}. |
There was a problem hiding this comment.
This is not clear to me: "compare TimestampExtractor"? Or rather "see TimestampExtractor"?
| * Specifies that records of the same key are joinable if their timestamps are within | ||
| * the join window interval, and if the timestamp of a record from the secondary stream is | ||
| * earlier than or equal to the timestamp of a record from the first stream. | ||
| * Changes the start window boundary to {@code timeDifferenceMs} but keep the end window boundary as-is. |
| * the join window interval, and if the timestamp of a record from the secondary stream | ||
| * is later than or equal to the timestamp of a record from the first stream. | ||
| * Changes the end window boundary to {@code timeDifferenceMs} but keep the start window boundary as-is. | ||
| * Thus, records of the same key are joinable if the timestamp of a record from the secondary stream is max |
There was a problem hiding this comment.
max timeDifferenceMs later than -> at most ...
| * maintain duration. | ||
| * <p> | ||
| * If not explicitly specified, the default maintain duration is 1 day. | ||
| * For time semantics, compare {@link org.apache.kafka.streams.processor.TimestampExtractor TimestampExtractor}. |
|
@guozhangwang @enothereska @dguy Addresses all you comments. |
|
Merged to trunk and 0.10.2. |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
- also some code refactoring and bug fixes Author: Matthias J. Sax <matthias@confluent.io> Reviewers: Damian Guy, Eno Thereska, Guozhang Wang Closes apache#2337 from mjsax/javaDocImprovements4