apache / apache/gravitino

[Improvement] support batch API for tag operation

Open
#7,454 1 comment 0 reactions 1 assignee Claimed by @yunchipang View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

Description

### What would you like to be improved?

For the current tag API, listing metadata objects for a group of tags requires iteratively calling `tag.associatedObjects().objects()`, which is both inconvenient for users and costly in terms of performance. It would be better to add a batch API for tag operations.

### How should we improve?

we can add a batch API for such usage:

```
// for java
GravitinoClient client = ...
String[] tagNames = {"tag1", "tagN"}
MetadataObject[] objects = client.listMetadataObjectsForTags(tagNames);

// for rest
curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \
http://localhost:8090/api/metalakes/test/tags/objects?tags=tag1,tag2,tag3

// response example:
{
"code": 0,
"metadataObjects": [
{
"type": "CATALOG",
"fullName": "my_catalog"
},
{
"type": "SCHEMA",
"fullName": "my_catalog.my_schema"
},
{
"type": "TABLE",
"fullName": "my_catalog.my_schema.my_table"
}
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.