jerryshao commented on code in PR #4108:
URL: https://github.com/apache/gravitino/pull/4108#discussion_r1679084594
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoMetalake.java:
##########
@@ -216,6 +217,45 @@ public boolean dropCatalog(String catalogName) {
return resp.dropped();
}
+ /**
+ * Test whether a catalog can be created successfully with the specified
parameters, without
+ * actually creating it.
+ *
+ * @param catalogName the name of the catalog.
+ * @param type the type of the catalog.
+ * @param provider the provider of the catalog.
+ * @param comment the comment of the catalog.
+ * @param properties the properties of the catalog.
+ * @throws Exception if the test failed.
+ */
+ @Override
+ public void testConnection(
+ String catalogName,
+ Catalog.Type type,
+ String provider,
+ String comment,
+ Map<String, String> properties)
+ throws Exception {
+ CatalogCreateRequest req =
+ new CatalogCreateRequest(catalogName, type, provider, comment,
properties);
+ req.validate();
+
+ ErrorResponse resp =
Review Comment:
Can you please add a comment here?
--
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]