roryqi commented on code in PR #9785:
URL: https://github.com/apache/gravitino/pull/9785#discussion_r2787765000
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -973,15 +982,16 @@ private CatalogWrapper createCatalogWrapper(
* properties) of the catalog entity.
*
* @param entity The catalog entity.
- * @return The resolved properties.
+ * @return The resolved BaseCatalog instance.
*/
- private Map<String, String> getResolvedProperties(CatalogEntity entity) {
+ private BaseCatalog getBaseCatalog(CatalogEntity entity) {
Map<String, String> conf = entity.getProperties();
String provider = entity.getProvider();
try (IsolatedClassLoader classLoader = createClassLoader(provider, conf)) {
BaseCatalog<?> catalog = createBaseCatalog(classLoader, entity);
- return classLoader.withClassLoader(cl -> catalog.properties(),
RuntimeException.class);
+ classLoader.withClassLoader(cl -> catalog.properties(),
RuntimeException.class);
+ return catalog;
}
Review Comment:
It's common used in our project. We can't think a better solution.
--
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]