Skip to content

[FLINK-37863] add DynamicKafkaSource interface #177

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lgo
Copy link

@lgo lgo commented May 28, 2025

Addresses FLINK-37863, adding the Python interfaces for using the DynamicKafkaSource in Python.

TODO:

  • Setup an actual test pipeline to make sure everything works
  • Run expect tests prior to converting from draft (verify, e2e tests)
  • Run though other contribution requirements

Copy link

boring-cyborg bot commented May 28, 2025

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

Copy link
Contributor

@dianfu dianfu left a comment

Choose a reason for hiding this comment

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

@lgo Thanks for the PR. Seems good to me although it's still marked as a draft:)

Just left one minor comment. Besides, could you also update the doc corresponding to https://nightlies.apache.org/flink/flink-docs-release-2.0/docs/connectors/datastream/dynamic-kafka/ ?

# Metadata service
# ---------------------------------------------------------------------

def set_kafka_metadata_service(self, kafka_metadata_service: JavaObject) -> \
Copy link
Contributor

Choose a reason for hiding this comment

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

What about also introducing some basic built-in KafkaMetadataService implementations, e.g. SingleClusterTopicMetadataService, etc. Otherwise, it would be difficult for Python users to use.

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good. I'll see what it'll take to make that happen, although I have not yet looked at how much of the Java<>Python bindings work and whether anything special is needed for this.

Any chance you have a pointer to any easy solution for packaging up an arbitrary JavaObject?

Copy link
Contributor

Choose a reason for hiding this comment

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

The implementation of Python DynamicKafkaSource in this pull request could be seen as just a wrapper of an arbitrary JavaObject?

@lgo
Copy link
Author

lgo commented Jun 6, 2025

Regarding being in draft - I'll change that once I get the time to actually try it out versus just some partially baked testing.

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

Successfully merging this pull request may close these issues.

2 participants