-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Functions] Support KEY_BASED batch builder for Java based functions and sources #11706
[Functions] Support KEY_BASED batch builder for Java based functions and sources #11706
Conversation
There's a remaining gotcha with sources. For sources, the
I wonder if this is a bug or a feature. |
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.
The change makes sense to me.
As usual we should add some test case that will save us from future regressions.
I am sorry but we need a end to end integration test for this
I completely agree. The changes in the PR now fix the various issues and it's time to think about the test coverage to prevent regressions. |
I also fixed this problem as part of this PR. |
… (backports apache#11706) - backports apache#11706 to branch-2.7 - include batchBuilder in ProducerSpec -> ProducerConfig.ProducerConfigBuilder conversion since it was missing - support setting batch builder with "--batch-builder KEY_BASED" argument
@nlu90 Can you review this PR? |
@codelipenghui @nlu90 @wolfstudy Please review the changes. |
…and sources - squashed commits for PR apache#11706
9ae27bc
to
1a1f10a
Compare
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.
LGTM
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.
LGTM +1
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.
LGTM
…and sources (#11706) * [Functions] Support KEY_BASED batch builder for Java based functions and sources * Include batchBuilder in ProducerSpec -> ProducerConfig.ProducerConfigBuilder conversion * Support setting batch builder for sources with "--batch-builder KEY_BASED" argument (cherry picked from commit b923af1)
…and sources (apache#11706) * [Functions] Support KEY_BASED batch builder for Java based functions and sources * Include batchBuilder in ProducerSpec -> ProducerConfig.ProducerConfigBuilder conversion * Support setting batch builder for sources with "--batch-builder KEY_BASED" argument
Motivation
#8523 added support for configuring KEY_BASED batch builder for functions and sources. However, the implemention missed some parts for Java based functions and sources. Support for Go was added in #8561 and for Python in #8540 .
The required code went missing as part of reverting #8434 changes in #10843 . The KEY_BASED logic had been added to the PulsarCluster class after #8434 had been merged.
Modifications
producerBuilder.batcherBuilder(BatcherBuilder.KEY_BASED)
when batch-builder is configured asKEY_BASED
.--batch-builder KEY_BASED
passed topulsar-admin sources create
command didn't do anything.