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

[#2467] feat(kafka-catalog): Add schema operations support for Kafka catalog #2521

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

mchades
Copy link
Contributor

@mchades mchades commented Mar 13, 2024

What changes were proposed in this pull request?

This PR tracks the work of adding schema support for the Kafka catalog. Unlike the other catalog, the Kafka catalog manages schema in the Gravitino's store, and will automatically create a “default” schema to contain all topics in the cluster.

Why are the changes needed?

Fix: #2467

Does this PR introduce any user-facing change?

no

How was this patch tested?

UTs added

@mchades mchades requested review from jerryshao and diqiu50 March 13, 2024 10:27
@mchades mchades self-assigned this Mar 13, 2024
// use gravitino catalog id as the admin client id
adminClientConfig.put("client.id", config.get(ID_KEY));

createDefaultSchema();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to verify that the configuration is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already checked the parameters above, is there anything else that needs to be verified?

Copy link
Contributor

@diqiu50 diqiu50 Mar 15, 2024

Choose a reason for hiding this comment

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

Is another catalog checking it? Verifying the ability to connect to Kafka is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will not check the connection here because creating a default schema does not require any interaction with Kafka.

Connection will be automatically checked when operating topics.

}

// TODO: Implement dropping schema after adding support for schema creation
throw new UnsupportedOperationException("Kafka catalog does not support schema alteration");
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you still need this?

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 above is for altering the default schema, which throws an IllegalArgumentException.

Here, for altering other schemas, it throws an UnsupportedOperationException.

@jerryshao jerryshao merged commit ffb80e7 into apache:main Mar 15, 2024
12 checks passed
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.

[Subtask] Support default schema for Kafka catalog
4 participants