-
Notifications
You must be signed in to change notification settings - Fork 409
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
Conversation
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
// use gravitino catalog id as the admin client id | ||
adminClientConfig.put("client.id", config.get(ID_KEY)); | ||
|
||
createDefaultSchema(); |
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.
Do we need to verify that the configuration is correct?
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.
Already checked the parameters above, is there anything else that needs to be verified?
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.
Is another catalog checking it? Verifying the ability to connect to Kafka is better.
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.
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.
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
...aging-kafka/src/main/java/com/datastrato/gravitino/catalog/kafka/KafkaCatalogOperations.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
// TODO: Implement dropping schema after adding support for schema creation | ||
throw new UnsupportedOperationException("Kafka catalog does not support schema alteration"); |
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.
Do you still need this?
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 above is for altering the default schema, which throws an IllegalArgumentException
.
Here, for altering other schemas, it throws an UnsupportedOperationException
.
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