lasdf1234 commented on code in PR #11848:
URL: https://github.com/apache/gravitino/pull/11848#discussion_r3511225403
##########
core/src/main/java/org/apache/gravitino/EntityStore.java:
##########
@@ -167,6 +168,66 @@ <E extends Entity & HasIdentifier> E update(
<E extends Entity & HasIdentifier> E get(NameIdentifier ident, EntityType
entityType, Class<E> e)
throws NoSuchEntityException, IOException;
+ /**
+ * Get the entity from the underlying storage by external id within the
namespace.
+ *
+ * @param namespace the namespace of the entity
+ * @param entityType the general type of the entity
+ * @param type the detailed type of the entity
+ * @param externalId the external id of the entity
+ * @param <E> the class of entity
+ * @return the entity retrieved from the underlying storage
+ * @throws NoSuchEntityException if the entity does not exist
+ * @throws IOException if the retrieve operation fails
+ */
+ <E extends Entity & HasIdentifier> E getByExternalId(
+ Namespace namespace, EntityType entityType, Class<E> type, String
externalId)
+ throws NoSuchEntityException, IOException;
+
+ /**
+ * Update the enabled state of a user by external id within the user
namespace.
+ *
+ * @param namespace the user namespace of the metalake
+ * @param externalId the external id of the user
+ * @param enabled the expected enabled state
+ * @return the updated user entity
+ * @throws NoSuchEntityException if the user does not exist
+ * @throws IOException if the update operation fails
+ */
+ default UserEntity updateUserEnabledByExternalId(
Review Comment:
The upstream system that call the gravitino interface are all associated
using externalId as the key.
--
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]