Skip to content

Extract pluggable interface for kafka cluster supplier#16272

Merged
beinan merged 1 commit intoprestodb:masterfrom
yangy0000:cluster-metadata
Jul 23, 2021
Merged

Extract pluggable interface for kafka cluster supplier#16272
beinan merged 1 commit intoprestodb:masterfrom
yangy0000:cluster-metadata

Conversation

@yangy0000
Copy link
Contributor

@yangy0000 yangy0000 commented Jun 15, 2021

The intention of this PR is to build the ground layer for Kafka multiple clusters support proposed in #15845
This PR built a pluggable Kafka cluster metadata supplier interface and moved the existing implementation into FileKafkaClusterMetadataSupplier.
Tested and verified at local.

== RELEASE NOTES ==
Kafka Changes
* Extract pluggable interface for kafka cluster supplier

@yangy0000 yangy0000 changed the title WIP: Extract pluggable KafkaClusterMetadataSupplier WIP: Extract pluggable interface for kafka cluster supplier Jun 15, 2021
@yangy0000 yangy0000 force-pushed the cluster-metadata branch 2 times, most recently from 1a9d37e to 3f1b0d5 Compare June 16, 2021 20:06
@yangy0000 yangy0000 changed the title WIP: Extract pluggable interface for kafka cluster supplier Extract pluggable interface for kafka cluster supplier Jun 16, 2021
@yangy0000
Copy link
Contributor Author

@beinan can you help to review the PR , thanks

Copy link
Member

@beinan beinan left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a couple of clarification questions.


@Config("kafka.hide-internal-columns")
public KafkaConnectorConfig setHideInternalColumns(boolean hideInternalColumns)
@Config("kafka.cluster-metadata-supplier")
Copy link
Member

Choose a reason for hiding this comment

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

Shall we document this new configuration? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as for now, the only option for this configuration is the default option. do you recommend adding the document now or later when the new supplier is added?

Copy link
Member

Choose a reason for hiding this comment

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

I see, we can document it later I think. I remember you also made some other pluggable interface before. Maybe you can document these new configuration together later.

Comment on lines -82 to -93
public List<HostAddress> getNodes()
{
return nodes;
}

@Config("kafka.nodes")
public KafkaConnectorConfig setNodes(String nodes)
{
this.nodes = (nodes == null) ? null : parseNodes(nodes).asList();
return this;
}

Copy link
Member

Choose a reason for hiding this comment

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

Just wanna double confirm if this would break the existing config. is there any config migration required for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The existing config can work as-is, no config migration is needed.
The reason is default cluster metadata supplier(FileKafkaClusterMetadataSupplier) will load FileKafkaClusterMetadataSupplierConfig which is the copy of the config that has been removed from this file.

Copy link
Member

Choose a reason for hiding this comment

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

Cool, sounds good to me.

@yangy0000 yangy0000 requested a review from beinan July 23, 2021 04:14
Copy link
Member

@beinan beinan left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@beinan beinan merged commit 9a5dd79 into prestodb:master Jul 23, 2021
@ajaygeorge
Copy link
Contributor

@yangy0000 / @beinan
This PR is missing release notes. Can you please add the Release notes as described by the guidelines here .

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.

3 participants