-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINOR: cleanup KStream JavaDocs (4/N) - stream-table-inner-join #18721
base: trunk
Are you sure you want to change the base?
Conversation
@@ -42,24 +42,24 @@ | |||
import static org.apache.kafka.streams.processor.internals.metrics.TaskMetrics.droppedRecordsSensor; | |||
import static org.apache.kafka.streams.state.ValueAndTimestamp.getValueOrNull; | |||
|
|||
class KStreamKTableJoinProcessor<K1, K2, V1, V2, VOut> extends ContextualProcessor<K1, V1, K1, VOut> { | |||
class KStreamKTableJoinProcessor<KStream, VStream, KTable, VTable, VOut> extends ContextualProcessor<KStream, VStream, KStream, VOut> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flipping type order -- no splash radius -- change limited to this line only, but diff is weird.
Effectively renaming K1 -> KStream
, V1 -> VStream
, K2 -> KTable
, and V2 -> VTable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbejeck Mentioned on some other PR, that KStream
(and KTable
) is a confusing generic type var, as we also have interfaces KStream
and KTable
.
Might be good to rename this differently, but I am not sure how. Ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KLeft
and KRight
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe.
I was thinking about StreamKey
/StreamValue
/TableKey
/TableValue
to highlight that it's two different "objects". Left/Right would not express this explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @mjsax, LGTM. Left some minor comment that you can decide yourself if you want to address them.
* For this case, all data of the stream will be redistributed through the repartitioning topic by writing all | ||
* records to it, and rereading all records from it, such that the join input {@code KStream} is partitioned | ||
* correctly on its key. | ||
* Join records of this stream with {@link KTable}'s records using non-windowed inner equi join. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think usually it's written equi-join
not equi join
.
* smaller than the defined grace-period allows; these "late records" will be dropped, and not join computation | ||
* is triggered. | ||
* Using a versioned state store for the {@link KTable} also implies that the defined "history retention" provides | ||
* a cut-off point, and "late record" will be dropped, not updating the {@link KTable} state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* a cut-off point, and "late record" will be dropped, not updating the {@link KTable} state. | |
* a cut-off point, and late records will be dropped, not updating the {@link KTable} state. |
* Note, that using a join grace-period introduces the notion of "late records", i.e., records with a timestamp | ||
* smaller than the defined grace-period allows; these "late records" will be dropped, and not join computation | ||
* is triggered. | ||
* Using a versioned state store for the {@link KTable} also implies that the defined "history retention" provides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit unclear what you mean by history retention here. It's quoted and not mentioned before, not explained.
* Using a versioned state store for the {@link KTable} also implies that the defined "history retention" provides | ||
* a cut-off point, and "late record" will be dropped, not updating the {@link KTable} state. | ||
* <p>If a join grace-period is specified, the {@code KStream} will be materialized in a local state store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this paragraph would better be placed before the explanation of versioned state stores, since it's explaining state stores generally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this way on purpose. Note, it's about KStream
side materialization, and we only materialize the stream, if a grace-period is specific -- but we only allow this, if the KTable
is versioned.
For regular/non-versioned KTables, using a grace-period and materializing/buffering the stream records does not make sense -- if there not multiple versions per-key, there is no point in delaying the KTable lookup.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah, yes. Sorry, I misread this paragraph, still thinking about the KTable
. This makes sense.
bfc0311
to
965da38
Compare
Updates look good to me |
Java 17:
Java 23:
Fix for |
streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java
Outdated
Show resolved
Hide resolved
streams/src/main/java/org/apache/kafka/streams/kstream/KStream.java
Outdated
Show resolved
Hide resolved
….java revert to avoid conflicts in follow up PRs
No description provided.