FANNG1 commented on code in PR #10517:
URL: https://github.com/apache/gravitino/pull/10517#discussion_r3130280048
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/store/GravitinoCatalogStore.java:
##########
@@ -160,8 +185,13 @@ private BaseCatalogFactory
discoverFactories(Predicate<Factory> predicate, Strin
if (catalogFactory instanceof BaseCatalogFactory &&
predicate.test(catalogFactory)) {
factories.add(catalogFactory);
}
+ } catch (ServiceConfigurationError e) {
+ LOG.debug(
+ "Skip a {} entry that cannot be initialized.",
Factory.class.getCanonicalName(), e);
} catch (NoClassDefFoundError e) {
LOG.debug("NoClassDefFoundError when loading a {}.",
Factory.class.getCanonicalName(), e);
+ } catch (LinkageError e) {
+ LOG.debug("LinkageError when loading a {}.",
Factory.class.getCanonicalName(), e);
Review Comment:
They are ignored only during `ServiceLoader` scanning for optional Flink
catalog factories. In the versioned connector layout, some provider factories
can be present in service files but unavailable on a specific Flink/provider
classpath. Skipping `ServiceConfigurationError`, `NoClassDefFoundError`, and
`LinkageError` lets discovery continue to other valid factories; unexpected
exceptions are still propagated. I added comments to make this boundary
explicit.
--
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]