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


##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoClient.java:
##########
@@ -308,6 +312,31 @@ public Group revokeRolesFromGroup(List<String> roles, 
String group)
     return getMetalake().revokeRolesFromGroup(roles, group);
   }
 
+  /**
+   * Get the owner of a metadata object.
+   *
+   * @param object The metadata object
+   * @return The owner of the metadata object. If the metadata object doesn't 
set the owner, it will
+   *     return Optional.empty().
+   * @throws NotFoundException If the metadata object is not found.
+   */
+  public Optional<Owner> getOwner(MetadataObject object) throws 
NotFoundException {

Review Comment:
   The API signature is not so good, `NotFoundException` and `Optional` have 
some semantic overlaps, developers may be confused when this will return empty, 
or when it will have NFE, unless they read the document, so we need to make 
this more clear and easy to understand.



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