sunyuhan1998 opened a new issue, #10808:
URL: https://github.com/apache/gravitino/issues/10808

   ### What would you like to be improved?
   
   The Gravitino Java client (`GravitinoMetalake`) already provides 
`getOwner()` and `setOwner()` methods for managing ownership of metadata 
objects, but the Python SDK lacks these capabilities. Users who need to manage 
ownership must fall back to raw REST API calls via `requests`, which is 
inconsistent with the SDK's design.
   
   ### How should we improve?
   
   Add the following Owner API to the Python SDK, aligning with the Java 
implementation:
   
   **New classes:**
   - `gravitino.api.authorization.owner.Owner` — Owner interface with `Type` 
enum (`USER` / `GROUP`)
   - `gravitino.dto.authorization.owner_dto.OwnerDTO` — Owner DTO
   - `gravitino.dto.requests.owner_set_request.OwnerSetRequest` — setOwner 
request body
   - `gravitino.dto.responses.owner_response.OwnerResponse` — getOwner response
   - `gravitino.dto.responses.set_response.SetResponse` — setOwner response
   - `gravitino.exceptions.handlers.owner_error_handler.OwnerErrorHandler` — 
error handler
   
   **API methods on `GravitinoMetalake` and `GravitinoClient`:**
   - `get_owner(metadata_object) -> Optional[Owner]`
   - `set_owner(metadata_object, owner_name, owner_type) -> None`
   
   **REST endpoint**: `GET/PUT 
api/metalakes/{metalake}/owners/{type}/{fullName}`
   
   A PR will be submitted shortly to implement this.
   
   Related: #10782 (Python SDK authorization management support — 
User/Group/Role/Privilege CRUD). The Owner API is independent and 
non-overlapping with the RBAC PR; potential merge conflicts are limited to 
`gravitino_metalake.py` and `gravitino_client.py` imports but at different 
insertion points.


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