Skip to content
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

KAFKA-18026: KIP-1112, clean up StatefulProcessorNode #18195

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

ableegoldman
Copy link
Member

Final cleanup of StatefulProcessorNode after converting all stateful operators to adding state stores via implementing the #stores method. This PR can't be merged until we merge these two open PRs:

  1. KAFKA-18026: KIP-1112, migrate foreign-key joins to use ProcesserSupplier#stores  #18194 (FKJ)
  2. KAFKA-18026: KIP-1112 migrate KTableSuppressProcessorSupplier #18150 (suppress)

@mumrah
Copy link
Member

mumrah commented Dec 16, 2024

@ableegoldman #17881 adds a "triage" label to PRs from non-committers. Turns out this also affect committers if their membership visibility in the ASF GitHub org is not public. I added instructions for setting your membership visibility to public https://github.com/apache/kafka/blob/trunk/.github/workflows/README.md#pr-triage

@ableegoldman ableegoldman force-pushed the KIP-1112-StatefulProcessorNode-cleanup branch from af0931d to 8c061b7 Compare December 20, 2024 15:02

This comment was marked as outdated.

@mumrah mumrah removed triage PRs from the community needs-attention labels Dec 23, 2024
Copy link
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Made a pass. Please feel free to merge after incorporating the unit test comment.

aggFunctionName,
new ProcessorParameters<>(aggregateSupplier, aggFunctionName),
new String[] {storeFactory.storeName()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for line 57 above and independent from the PR: just a thought, could we pass in storeFactory.storeName() in the future?

@@ -1225,7 +1225,8 @@ public <KOut, VOut> KStream<KOut, VOut> process(
}

final String name = new NamedInternal(named).name();
final StatefulProcessorNode<? super K, ? super V> processNode = new StatefulProcessorNode<>(
final ProcessorToStateConnectorNode<? super K, ? super V> processNode = new
ProcessorToStateConnectorNode<>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is newline necessary?

);
builder.addGraphNode(subscriptionSource, subscriptionReceiveNode);

final KTableValueGetterSupplier<KO, VO> foreignKeyValueGetter = ((KTableImpl<KO, VO, VO>) foreignKeyTable).valueGetterSupplier();
final StatefulProcessorNode<CombinedKey<KO, K>, Change<ValueAndTimestamp<SubscriptionWrapper<K>>>> subscriptionJoinNode =
new StatefulProcessorNode<>(
final ProcessorToStateConnectorNode<CombinedKey<KO, K>, Change<ValueAndTimestamp<SubscriptionWrapper<K>>>> subscriptionJoinNode =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I thought I do not need to use the newly introduced ProcessorToStateConnectorNode for this case but only needed for those process/transform with a store list, but thinking that again we probably do not have another way around at the moment..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same thought actually. I did take a quick look at it but ultimately decided that whether or not it was possible, it would be too much for this one PR. So I'm going to revisit this in a followup PR if it does indeed make sense to do

@@ -0,0 +1,74 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a unit test class for this new node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants