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


##########
core/src/main/java/com/datastrato/gravitino/connector/BaseCatalog.java:
##########
@@ -169,12 +180,59 @@ public CatalogOperations ops() {
     return ops;
   }
 
+  public AuthorizationPlugin getAuthorizationPlugin() {
+    if (authorization == null) {
+      synchronized (this) {
+        if (authorization == null) {
+          authorization = createAuthorizationPluginInstance();
+        }
+      }
+    }
+    return authorization.plugin();
+  }
+
+  private BaseAuthorization<?> createAuthorizationPluginInstance() {
+    String authorizationProvider =
+        (String) catalogPropertiesMetadata().getOrDefault(conf, 
AUTHORIZATION_PROVIDER);
+    if (authorizationProvider == null) {
+      throw new IllegalArgumentException("Authorization provider is not set");
+    }

Review Comment:
   Besides, I think this should not be a default behavior, right, we can let 
users to not configure the authorization plugin.



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