Package org.apache.gravitino.tag
Interface TagOperations
- All Known Implementing Classes:
GravitinoClient,GravitinoMetalake
Interface for supporting global tag operations. This interface will provide tag listing, getting,
creating, and other tag operations under a metalake. This interface will be mixed with
GravitinoMetalake or GravitinoClient to provide tag operations.
-
Method Summary
Modifier and TypeMethodDescriptionAlter a tag under a metalake.Create a tag under a metalake.booleanDelete a tag under a metalake.Get a tag by its name under a metalake.String[]listTags()List all the tag names under a metalake.Tag[]List all the tags with detailed information under a metalake.
-
Method Details
-
listTags
List all the tag names under a metalake.- Returns:
- The list of tag names.
- Throws:
NoSuchMetalakeException- If the metalake does not exist.
-
listTagsInfo
List all the tags with detailed information under a metalake.- Returns:
- The list of tags.
- Throws:
NoSuchMetalakeException- If the metalake does not exist.
-
getTag
Get a tag by its name under a metalake.- Parameters:
name- The name of the tag.- Returns:
- The tag.
- Throws:
NoSuchTagException- If the tag does not exist.
-
createTag
Tag createTag(String name, String comment, Map<String, String> properties) throws TagAlreadyExistsExceptionCreate a tag under a metalake.- Parameters:
name- The name of the tag.comment- The comment of the tag.properties- The properties of the tag.- Returns:
- The created tag.
- Throws:
TagAlreadyExistsException- If the tag already exists.
-
alterTag
Alter a tag under a metalake.- Parameters:
name- The name of the tag.changes- The changes to apply to the tag.- Returns:
- The altered tag.
- Throws:
NoSuchTagException- If the tag does not exist.IllegalArgumentException- If the changes cannot be applied to the tag.
-
deleteTag
Delete a tag under a metalake.- Parameters:
name- The name of the tag.- Returns:
- True if the tag is deleted, false if the tag does not exist.
-