Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 18202200B33 for ; Wed, 29 Jun 2016 22:09:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0E89E160A57; Wed, 29 Jun 2016 20:09:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 53219160A3C for ; Wed, 29 Jun 2016 22:09:26 +0200 (CEST) Received: (qmail 2492 invoked by uid 500); 29 Jun 2016 20:09:25 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 2481 invoked by uid 99); 29 Jun 2016 20:09:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2016 20:09:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B6EADC00EA for ; Wed, 29 Jun 2016 20:09:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 62xrByIYzxw4 for ; Wed, 29 Jun 2016 20:09:22 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 91CA45FBA1 for ; Wed, 29 Jun 2016 20:09:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u5TK9LPe026205; Wed, 29 Jun 2016 20:09:21 GMT Message-Id: <201606292009.u5TK9LPe026205@ip-10-146-233-104.ec2.internal> Date: Wed, 29 Jun 2016 20:09:21 +0000 From: "Huaisi Xu (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Dimitris Tsirogiannis Reply-To: hxu@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-3711=3A_Remove_unnecessary_privilege_checks_in_getDbsMetadata=28=29=0A?= X-Gerrit-Change-Id: I17d8c5b9fb12483e4b01b819fba48b6849311a14 X-Gerrit-ChangeURL: X-Gerrit-Commit: ec34a02f6aa90fcdf232cf21ee61f3067be61bd0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Wed, 29 Jun 2016 20:09:27 -0000 Huaisi Xu has posted comments on this change. Change subject: IMPALA-3711: Remove unnecessary privilege checks in getDbsMetadata() ...................................................................... Patch Set 11: (9 comments) sorry was having a team lunch. http://gerrit.cloudera.org:8080/#/c/3371/11//COMMIT_MSG Commit Message: PS11, Line 9: suffers > suffered Done 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 Done 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 Done 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 Done 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.getTableNam I did not think much about this.. for me it is the same. another reason I just thought of is that we cannot do that in getColumns() since it matches everything itself. So the idea maybe catalog.java does not take null matcher? I can definitely move that if you insist. PS11, Line 642: if (matcher == null) return Collections.emptyList(); > Same comment as above. see 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" Done 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_ Done 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 Done -- 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 Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Huaisi Xu Gerrit-HasComments: Yes