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

[FLINK-32938] Replace pulsar admin calls #59

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

nlu90
Copy link
Member

@nlu90 nlu90 commented Aug 31, 2023

Purpose of the change

Replace PulsarAdmin calls with PulsarClient or Consumer calls

Brief change log

  • Change the internal design of ProducerRegister.
  • Expose topic metadata query in PulsarSinkContext.
  • Change the internal metadata cache in MetadataListener.

Verifying this change

This change is already covered by existing tests, such as (please describe tests).

Significant changes

(Please check any boxes [x] if the answer is "yes". You can first publish the PR and check them afterwards, for
convenience.)

  • Dependencies have been added or upgraded
  • Public API has been changed (Public API is any class annotated with @Public(Evolving))
  • Serializers have been changed
  • New feature has been introduced
    • If yes, how is this documented? (not applicable / docs / JavaDocs / not documented)

@boring-cyborg
Copy link

boring-cyborg bot commented Aug 31, 2023

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@nlu90 nlu90 changed the title remove pulsar admin dependency [FLINK-32938] Replace pulsar admin calls Aug 31, 2023
@nlu90 nlu90 marked this pull request as ready for review September 11, 2023 22:18
@nlu90
Copy link
Member Author

nlu90 commented Sep 11, 2023

Can someone help rerun the CI? On my local laptop, everything runs fine:

-> mvn clean verify
...
...
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Flink : Connectors : Pulsar : Parent 4.0-SNAPSHOT:
[INFO] 
[INFO] Flink : Connectors : Pulsar : Parent ............... SUCCESS [  1.819 s]
[INFO] Flink : Connectors : Pulsar ........................ SUCCESS [27:41 min]
[INFO] Flink : Connectors : Pulsar : SQL .................. SUCCESS [  5.184 s]
[INFO] Flink : Connectors : Pulsar : E2E Tests ............ SUCCESS [  1.157 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  27:50 min
[INFO] Finished at: 2023-09-11T15:01:51-07:00
[INFO] ------------------------------------------------------------------------

@tisonkun tisonkun self-requested a review September 15, 2023 02:50
@tisonkun
Copy link
Member

@nlu90 retriggered and passed. I'm reviewing this patch now.

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

We need to update the document a bit. And since we bump the minima Pulsar version, I'm afraid that we already need a new major version bump. And thus it's possible we remove the deprecated method.

@@ -126,9 +123,11 @@ public class PulsarSinkBuilder<IN> {
*
* @param adminUrl The url for the PulsarAdmin.
* @return this PulsarSinkBuilder.
* @deprecated this method will return builder directly
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add a link to this PR as background. But it's OK that we do it in a follow-up patch.

@tisonkun
Copy link
Member

Merging...

I'll prepare a follow-up patch for docs updates, which includes a response for FLINK-33111

@tisonkun tisonkun merged commit 78d00ea into apache:main Sep 21, 2023
2 of 3 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 21, 2023

Awesome work, congrats on your first merged pull request!

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