-
Notifications
You must be signed in to change notification settings - Fork 415
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
[#6474] improvement(storage): batch listing securable objects in RoleMetaService #6601
base: main
Are you sure you want to change the base?
[#6474] improvement(storage): batch listing securable objects in RoleMetaService #6601
Conversation
6dfb680
to
28b252a
Compare
@@ -88,6 +88,22 @@ public static SecurableObject ofTable( | |||
return of(MetadataObject.Type.TABLE, names, privileges); | |||
} | |||
|
|||
/** |
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.
Column isn't the securable object. So you should remove this.
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.
@jerqi ok, done.
@@ -120,6 +136,22 @@ public static SecurableObject ofFileset( | |||
return of(MetadataObject.Type.FILESET, names, privileges); | |||
} | |||
|
|||
/** |
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.
We don't support the privilege of the model now. You can remove this temporaly.
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.
…s: catalogIdAndNameMap
fb218a0
to
79de9f1
Compare
* if no Metalake objects are found for the given IDs. {@code @example} value of metalake full | ||
* name: "metalake1.catalog1.schema1.table1" | ||
*/ | ||
public static Map<Long, String> getMetalakeObjectFullNames(List<Long> ids) { |
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.
The name getMetalakeObjectsFullName
may be more proper.
|
||
schemaPOs.forEach( | ||
schemaPO -> { | ||
if (schemaPO.getSchemaId() == null) { |
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.
When will the schemaId be null?
@@ -125,6 +142,8 @@ public static String getMetadataObjectFullName(String type, long metadataObjectI | |||
case SCHEMA: | |||
SchemaPO schemaPO = SchemaMetaService.getInstance().getSchemaPOById(objectId); | |||
if (schemaPO != null) { | |||
// if fullName is null: |
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 can't the point. What's the meaning of the comment.
* if no Catalog objects are found for the given IDs. {@code @example} value of catalog full | ||
* name: "catalog1" | ||
*/ | ||
public static Map<Long, String> getCatalogObjectFullNames(List<Long> ids) { |
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.
Is it possible to merge getCatalogObjectFullNames
and getSchemaIdAndNameMap
?
What changes were proposed in this pull request?
Batch retrieving securable objects for
metalake
,catalog
,schema
,table
,model
,topic
,fileset
(fileset has been implemented at #6455).Why are the changes needed?
Improve performance when role is bounded to lots of
SecurableObject
s.Fix: #6474
Does this PR introduce any user-facing change?
No.
How was this patch tested?
In
TestSecurableObjects.testAllTypeSecurableObjects
.Related Issue and PR: #6238 #6455