mchades commented on code in PR #7625:
URL: https://github.com/apache/gravitino/pull/7625#discussion_r2236767401


##########
core/src/main/java/org/apache/gravitino/policy/PolicyManager.java:
##########
@@ -51,17 +68,51 @@ public PolicyManager(IdGenerator idGenerator, EntityStore 
entityStore) {
 
   @Override
   public String[] listPolicies(String metalake) {
-    throw new UnsupportedOperationException("Not implemented yet");
+    return 
Arrays.stream(listPolicyInfos(metalake)).map(Policy::name).toArray(String[]::new);
   }
 
   @Override
   public Policy[] listPolicyInfos(String metalake) {
-    throw new UnsupportedOperationException("Not implemented yet");
+    NameIdentifier metalakeIdent = NameIdentifierUtil.ofMetalake(metalake);
+    return TreeLockUtils.doWithTreeLock(
+        NameIdentifier.of(NamespaceUtil.ofPolicy(metalake).levels()),
+        LockType.READ,
+        () -> {
+          checkMetalake(metalakeIdent, entityStore);

Review Comment:
   ok, updated



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