-
Notifications
You must be signed in to change notification settings - Fork 380
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
[#4873] feat(core): support list group #4879
[#4873] feat(core): support list group #4879
Conversation
You can refer to the pull request https://github.com/apache/gravitino/pull/4055/files |
@LiuQhahah #4055 pull request about listing users have been merged. Do you have time to rework this pull request? |
Hi @jerqi what action need i to do ? |
#4055 is the pull request to support to list users. There are several points to modify.
|
Understood, thanks for the advice! |
…nt-Group-supports-list-operations
…operations # Conflicts: # clients/client-java/src/test/java/org/apache/gravitino/client/TestUserGroup.java # core/src/main/java/org/apache/gravitino/authorization/UserGroupManager.java # core/src/main/java/org/apache/gravitino/storage/relational/JDBCBackend.java
@LiuQhahah Do you have time to continue this work? Because we want to release this feature in 0.6.1. The 0.6.1 will be released at the end of this month. |
…operations # Conflicts: # core/src/main/java/org/apache/gravitino/storage/relational/JDBCBackend.java
Hi @jerqi |
I have updated partial user list implement. You can see #4894 |
@@ -227,6 +227,15 @@ public Group getGroup(String group) throws NoSuchGroupException, NoSuchMetalakeE | |||
return getMetalake().getGroup(group); | |||
} | |||
|
|||
|
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.
Javadoc is necessary.
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.
I'll add to that, thanks.
@LiuQhahah Could you give the permission of your repo? I can help you finish this pull request. We are eager to finish the feature before 0.6.1. |
Okay, thanks. |
…ment-Group-supports-list-operations
NoSuchMetalakeException.class, | ||
() -> { | ||
gravitinoClient.listGroupNames(); | ||
}); |
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.
() -> gravitinoClient.listGroupNames()
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.
OK.
String[] listGroupNames(String metalake) { | ||
return Arrays.stream(listGroupInternal(metalake, false)) | ||
.map(Group::name) | ||
.toArray(String[]::new); | ||
} |
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.
Can you please move this method above, after listGroups
.
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.
OK.
+ GROUP_TABLE_NAME | ||
+ " gt JOIN " | ||
+ MetalakeMetaMapper.TABLE_NAME | ||
+ " mt ON gt.metalake_id = mt.metalake_id WHERE mt.metalake_name = #{metalakeName}" |
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.
excessive space before WHERE
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.
OK, removed.
.forEach( | ||
group -> { | ||
Preconditions.checkArgument( | ||
StringUtils.isNotBlank(group.name()), "group 'name' must not be null and empty"); |
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.
null or blank
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.
Fixed.
@jerqi this PR cannot be backported automatically, please help to do it manually. |
support list group support list group Fix: apache#4873 no UT --------- Co-authored-by: Rory <[email protected]>
### What changes were proposed in this pull request? Supports to list groups. ### Why are the changes needed? Fix: #4873 ### Does this PR introduce _any_ user-facing change? I will add the document later. ### How was this patch tested? UT. Co-authored-by: Qiang-Liu <[email protected]>
What changes were proposed in this pull request?
(Please outline the changes and how this PR fixes the issue.)
Why are the changes needed?
support list group
Fix: #4873
Does this PR introduce any user-facing change?
no
How was this patch tested?
UT