KAFKA-7502: Cleanup KTable materialization logic in a single place#6174
KAFKA-7502: Cleanup KTable materialization logic in a single place#6174guozhangwang merged 9 commits intoapache:trunkfrom
Conversation
|
@guozhangwang Is this what you meant? I found similar routines in Please have a look you are free. |
|
retest this please |
79f0cc7 to
c5d691c
Compare
|
Rebased against the latest trunk. cc/ @guozhangwang @mjsax |
guozhangwang
left a comment
There was a problem hiding this comment.
@dongjinleekr Thanks for your PR! I went through it and realized my original description on the JIRA ticket may not be very clear. I've hence updated the description and let me know if it clarifies a few things.
As for the PR itself, splitting KTableKTableJoinNode seems to me not addressing the original issue, but I do really like the way you inlined buildJoin. So how about reducing the scope of this PR to just do the cleanup of inlining buildJoin, while we can continue discussing on the ticket at the best solution to achieve the address of the ticket.
c5d691c to
e57ad22
Compare
|
@guozhangwang I see. Then, how about this? I rebased against the latest trunk and added two commits (296ddfc, e57ad22); Now, all materialization logic in |
guozhangwang
left a comment
There was a problem hiding this comment.
This PR lgtm. I think this is a good first step towards KAFKA-7502. Left some minor comments.
Call for another review @bbejeck
|
@dongjinleekr could you run the unit test locally and see if the error is related? |
|
retest this please |
bbejeck
left a comment
There was a problem hiding this comment.
Overall this looks good to me, just a couple of minor comments.
|
Java 8 passed, Java 11 failed but build results already cleaned up. retest this please |
|
Both Java 8 and Java 11 failed, test results already cleaned out retest this please |
|
@dongjinleekr what's the status on this PR? Once the comments are addressed I believe we can merge this PR. |
|
@bbejeck Here is the update for the |
|
@dongjinleekr Let's use separate PRs on other operations so that we can keep this one small and tangible for reviewing / merging. BTW the failures are due to compilation errors: Could you run |
…ized]KTableKTableJoinNode. 2. Add KTableKTableJoinNodeBuilde#builder.
1. Add KTableKTableJoinNode[Builder]#keySerde. 2. Reorder KTableKTableJoinNodeBuilder's member methods, following the memeber variable definition order. 3. Add KTableKTableJoinNode#[getKeySerde, getValueSerde] methods. 4. Move KTableImpl#[keySerde, valueSerde] decision logic into KTableKTableJoinNodeBuilder#builder and [NonMaterialized, Materialized]KTableKTableJoinNode#[keySerde, valueSerde].
1. Make KTableKTableJoinMerger publie. (like KTableReduce, KTableAggregate.) 2. Add KTableKTableJoinMerger#of static methods: works as a workaround to the constructor. 3. Move [internalQueryableName, joinMerge, joinMergeProcessorParameters] variable in KTableImpl#doJoin into [NonMaterialized, Materialized]KTableKTableJoinNode.
…eJoinNode into KTableKTableJoinNode. 2. Move all materialization logic in KTableKTableJoinNode into KTable#doJoin.
…r#[builder, valueJoiner]
…KTableKTableJoinNode#queryableStoreName and use KTableKTableJoinMerger#getQueryableName instead.
…bleKTableJoinNodeBuilder
dfea944 to
c4afbff
Compare
|
@guozhangwang Here is the fix. I omitted a file from the last commit. (+1. rebased onto the latest trunk.) And also, I will separate the other operators from this issue in Jira. Is that okay? cc/ @bbejeck |
|
@guozhangwang Or, only separated PRs for this issue? @bbejeck |
|
Java 8 failed with Java 11 passed retest this please |
bbejeck
left a comment
There was a problem hiding this comment.
This PR looks good to me, less just one minor comment.
Fine with me to have multiple PRs on one Jira ticket, just make sure to have the Jira number in each PR title and in the PR comments state what parts you are working on. |
|
Here it is. OMG, I just learned one more thing about Java's final variable! Thanks @bbejeck :) And about Issue management, I am +1 to separating the PRs only. In that case, two of the other PRs should be based on the other, since I am now working on cc/ @guozhangwang |
|
LGTM! |
* apache/trunk: MINOR: Retain public constructors of classes from public API (apache#6455) KAFKA-8118; Ensure ZK clients are closed in tests, fix verification (apache#6456) KAFKA-7813: JmxTool throws NPE when --object-name is omitted KAFKA-8114: Wait for SCRAM credential propagation in DelegationTokenEndToEndAuthorizationTest (apache#6452) KAFKA-8111; Set min and max versions for Metadata requests (apache#6451) KAFKA-7855: Kafka Streams Maven Archetype quickstart fails to compile out of the box (apache#6194) MINOR: Update code to not use deprecated methods (apache#6434) MINOR: Update Trogdor ConnectionStressWorker status at the end of execution (apache#6445) KAFKA-8091; Use commitSync to check connection failure in listener update test (apache#6450) KAFKA-7027: Add an overload build method in scala (apache#6373) MINOR: Fix typos in LogValidator (apache#6449) KAFKA-7502: Cleanup KTable materialization logic in a single place (apache#6174) KAFKA-7730; Limit number of active connections per listener in brokers (KIP-402) KAFKA-8091; Remove unsafe produce from dynamic listener update test (apache#6443) MINOR: Fix JavaDocs warnings (apache#6435) MINOR: Better messaging for invalid fetch response (apache#6427) MINOR: Use Java 8 lambdas in KStreamImplTest (apache#6430)
…pache#6174) This is a draft cleanup for KAFKA-7502. Here is the details: * Make KTableKTableJoinNode abstract, and define its child classes ([NonMaterialized,Materialized]KTableKTableJoinNode) instead: now, all materialization-related routines are separated into the other classes. * KTableKTableJoinNodeBuilder#build now instantiates [NonMaterialized,Materialized]KTableKTableJoinNode classes instead of KTableKTableJoinNode. Reviewers: Guozhang Wang <wangguoz@gmail.com>, Bill Bejeck <bbejeck@gmail.com>
…ilter) (apache#6453) This PR is a follow-up of apache#6174, which handles doFilter / doMapValues / doTransformValues methods. Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
This PR is a follow-up of apache#6174 and apache#6453, which cleans up KTableImpl#doTransformValues method. Reviewers: Bill Bejeck <bbejeck@gmail.com>
This is a draft cleanup for KAFKA-7502. Here is the details:
KTableKTableJoinNodeabstract, and define its child classes ([NonMaterialized,Materialized]KTableKTableJoinNode) instead: now, all materialization-related routines are separated into the other classes.KTableKTableJoinNodeBuilder#buildnow instantiates[NonMaterialized,Materialized]KTableKTableJoinNodeclasses instead ofKTableKTableJoinNode.Committer Checklist (excluded from commit message)