-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#5817] core(feat): Add server-side REST APIs for model management #5948
base: main
Are you sure you want to change the base?
Conversation
server/src/main/java/org/apache/gravitino/server/web/rest/ModelOperations.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/gravitino/server/web/rest/ModelOperations.java
Outdated
Show resolved
Hide resolved
Preconditions.checkArgument( | ||
StringUtils.isNotBlank(alias), "alias must not be null or empty"); | ||
Preconditions.checkArgument( | ||
!NumberUtils.isCreatable(alias), "alias must not be a number or a number string"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why alias must not be a number or a number string? I don't see the limitation comment at the ModelVersion API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is because of the current implementation limitation, both the version and the alias will be treated as a part of NameIdentifier, if the name can be parsed as a number, then it will be treated as a version number, to avoid this ambiguity, I added this limitation. I can add the javadoc if needed.
What changes were proposed in this pull request?
This PR adds the server-side REST endpoint for model management.
Why are the changes needed?
This is a part of model management for Gravitino.
Fix: #5817
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Add UTs for this PR.