impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitris Tsirogiannis (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata()
Date Wed, 29 Jun 2016 17:45:52 GMT
Dimitris Tsirogiannis has posted comments on this change.

Change subject: IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata()
......................................................................


Patch Set 11:

(9 comments)

Almost done.

http://gerrit.cloudera.org:8080/#/c/3371/11//COMMIT_MSG
Commit Message:

PS11, Line 9: suffers
suffered


PS11, Line 15: . As a result, even though
             : user wants nothing, we ended up checking everything.
"thereby causing unnecessary privilege checks for catalog objects that aren't in the result
set."


PS11, Line 18: This patch changes getDbsMetadata()'s interface such that
             : caller can pass addition information and it knows whether
             : pattern is provided or not. This patch also applies filters
             : before checks any privilege.
Maybe we can refine it a bit. How about something like "This patch modifies the behavior of
getDbsMetadata() to avoid retrieving and checking for privileges of catalog entities that
are of no interest to the user."


http://gerrit.cloudera.org:8080/#/c/3371/11/fe/src/main/java/com/cloudera/impala/catalog/Catalog.java
File fe/src/main/java/com/cloudera/impala/catalog/Catalog.java:

PS11, Line 325: String
nit: Strings


http://gerrit.cloudera.org:8080/#/c/3371/11/fe/src/main/java/com/cloudera/impala/service/Frontend.java
File fe/src/main/java/com/cloudera/impala/service/Frontend.java:

PS11, Line 597: if (matcher == null) return Collections.emptyList();
Is there a reason why we can't push that check into the catalog.getTableNames() fn? In that
way, I believe every function that takes a PatternMatcher as input param will have consistent
behavior. Right now, some functions expect a non-null matcher while others simply return an
empty result set when the matcher is null.


PS11, Line 642: if (matcher == null) return Collections.emptyList();
Same comment as above.


http://gerrit.cloudera.org:8080/#/c/3371/11/fe/src/main/java/com/cloudera/impala/service/MetadataOp.java
File fe/src/main/java/com/cloudera/impala/service/MetadataOp.java:

Line 226:    * Utility Class that represents the input parameters of getDbsMetadata() function
call.
"a"


http://gerrit.cloudera.org:8080/#/c/3371/11/fe/src/main/java/com/cloudera/impala/util/PatternMatcher.java
File fe/src/main/java/com/cloudera/impala/util/PatternMatcher.java:

PS11, Line 34: pattern_
typo: patterns_


http://gerrit.cloudera.org:8080/#/c/3371/11/testdata/workloads/functional-query/queries/QueryTest/show.test
File testdata/workloads/functional-query/queries/QueryTest/show.test:

PS11, Line 157: This behaves different than Hive, see IMPALA-3744
"# Impala only considers '*' and '|' as meta-characters in SHOW statements (see IMPALA-3744).
"


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I17d8c5b9fb12483e4b01b819fba48b6849311a14
Gerrit-PatchSet: 11
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Huaisi Xu <hxu@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Huaisi Xu <hxu@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message