jerryshao commented on code in PR #5067:
URL: https://github.com/apache/gravitino/pull/5067#discussion_r1804244040
##########
server/src/main/java/org/apache/gravitino/server/web/rest/CatalogOperations.java:
##########
@@ -187,6 +187,70 @@ public Response testConnection(
}
}
+ @GET
Review Comment:
Is it better to use `PUT` or `POST`?
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -100,9 +106,22 @@ public class CatalogManager implements CatalogDispatcher,
Closeable {
private static final String CATALOG_DOES_NOT_EXIST_MSG = "Catalog %s does
not exist";
private static final String METALAKE_DOES_NOT_EXIST_MSG = "Metalake %s does
not exist";
+ private static final PropertiesMetadata BASIC_CATALOG_PROPERTIES_METADATA =
+ new BaseCatalogPropertiesMetadata() {
+ @Override
+ protected Map<String, PropertyEntry<?>> specificPropertyEntries() {
+ return Collections.emptyMap();
+ }
+ };
Review Comment:
We can create a singleton in `BaseCatalogPropertiesMetadata` and remove
`abstract` in this class to make it simple.
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -609,6 +679,44 @@ public CatalogWrapper loadCatalogAndWrap(NameIdentifier
ident) throws NoSuchCata
return catalogCache.get(ident, this::loadCatalogInternal);
}
+ private static boolean getInUseValue(EntityStore store, NameIdentifier
catalogIdent) {
+ try {
+ CatalogEntity catalogEntity =
+ store.get(catalogIdent, EntityType.CATALOG, CatalogEntity.class);
+ return (boolean)
+ BASIC_CATALOG_PROPERTIES_METADATA.getOrDefault(
Review Comment:
Why do we need a `BASIC_CATALOG_PROPERTIES_METADATA`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]