Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15068 )

Change subject: IMPALA-9242: Filter privileges before returning them to Sentry
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15068/12/fe/src/main/java/org/apache/impala/catalog/PrincipalPrivilegeTree.java
File fe/src/main/java/org/apache/impala/catalog/PrincipalPrivilegeTree.java:

http://gerrit.cloudera.org:8080/#/c/15068/12/fe/src/main/java/org/apache/impala/catalog/PrincipalPrivilegeTree.java@140
PS12, Line 140:     private List<String> toPath() {
> Curious to understand the motivation to disallow creating filter like serve
There is some explanation in the comment from line 38 to 42.
The goal was to speed up SHOW DATABASES/TABLES, and indexing URIs would not 
help with this, while it could potentially eat a lot of memory if there are a 
lot of URI privileges because each URI would need a Node object + a hash map 
for values.

I still wanted to add them to the PrincipalPrivilegeTree to give a simpler 
interface towards Privilege. This is a compromise, there is a cost though as 
every URI privilege is added to a hash map.

+1 reason is that the Sentry solution also doesn't create a Node for each URI: 
https://github.com/apache/sentry/blob/e2dd73d995be51f237cce3ae8240cc8c3407e820/sentry-provider/sentry-provider-cache/src/main/java/org/apache/sentry/provider/cache/TreePrivilegeNode.java#L222

The reason there is probably the case sensitivity of URIs.



--
To view, visit http://gerrit.cloudera.org:8080/15068
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iecd4281368d1c9fe88cfe850ea725cd68895712e
Gerrit-Change-Number: 15068
Gerrit-PatchSet: 12
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Anonymous Coward (498)
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>
Gerrit-Comment-Date: Tue, 11 Feb 2020 21:03:35 +0000
Gerrit-HasComments: Yes

Reply via email to