jerryshao commented on code in PR #3946:
URL: https://github.com/apache/gravitino/pull/3946#discussion_r1671559913


##########
core/src/main/java/com/datastrato/gravitino/connector/BaseCatalog.java:
##########
@@ -169,12 +180,60 @@ public CatalogOperations ops() {
     return ops;
   }
 
+  public AuthorizationPlugin getAuthorizationPlugin() {
+    if (authorization == null) {
+      synchronized (this) {
+        if (authorization == null) {
+          authorization = createAuthorizationPluginInstance();
+        }
+      }
+    }
+    return authorization.plugin();
+  }
+
+  private BaseAuthorization<?> createAuthorizationPluginInstance() {
+    AuthorizationPluginType pluginType =
+        (AuthorizationPluginType)
+            catalogPropertiesMetadata().getOrDefault(conf, 
AUTHORIZATION_PLUGIN);
+    if (pluginType == null) {

Review Comment:
   You have brought in two concepts, one is "provider", another is "type", so 
this confuses people a lot, I think we should only use one for all, like 
"provider".



-- 
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]

Reply via email to