dimas-b commented on code in PR #465:
URL: https://github.com/apache/polaris/pull/465#discussion_r1854231909
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/MetaStoreManagerFactory.java:
##########
@@ -50,4 +51,17 @@ public interface MetaStoreManagerFactory extends
Discoverable {
/** Purge all metadata for the realms provided */
void purgeRealms(List<String> realms);
+
+ /**
+ * Default {@link PolarisGrantManager} factory that returns the {@link
PolarisMetaStoreManager} as
+ * the grant manager.
+ *
+ * @param realm the current realm
+ * @return the {@link PolarisMetaStoreManager} returned by {@link
+ * #getOrCreateMetaStoreManager(RealmContext)}
+ */
+ @Override
+ default PolarisGrantManager getGrantManagerForRealm(RealmContext realm) {
Review Comment:
It feel like we have a clash between Encapsulation / Decoupling and
Dependency Injection concerns here. My impression from $417 was that we wanted
to separate different "managers" (which, I agree, is a good idea). However, it
looks like call paths to those managers still lead to one
`MetaStoreManagerFactory`. From my POV I do not see any other reason for this
but dependency injection. `MetaStoreManagerFactory` is provided the the
application on startup and all smaller "managers" stem from it.
I just had an idea that perhaps we could make a java services-based
mechanism for discovering specific metastore managers and have them isolated
from each other at the interface level. Would you be interested in a POC PR for
that (I can give it a try)?
--
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]