Fredy Wijaya has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11509


Change subject: IMPALA-7616: Remove the use of privilege name in TPrivilege
......................................................................

IMPALA-7616: Remove the use of privilege name in TPrivilege

Prior to this patch, privilege name was a field in TPrivilege Thrift
message. The privilege name was constructed from any other fields in
the TPrivilege. This is very error-prone since setting privilege name
prior to setting any other fields can cause a consistency issue.
Another issue is updating a particular field in TPrivilege requires
re-building the privilege name and updating its field. This patch
refactors the code by removing the privilege name field from the
TPrivilege and generates the privilege name as needed.

Testing:
- Ran all FE tests
- Ran authorization E2E tests

Change-Id: Ia813dcc7d3872f126865c1f8f37175201a0b10ab
---
M be/src/catalog/catalog-util.cc
M common/thrift/CatalogObjects.thrift
M fe/src/main/java/org/apache/impala/analysis/GrantRevokePrivStmt.java
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
M fe/src/main/java/org/apache/impala/catalog/Catalog.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/PrincipalPrivilege.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M fe/src/main/java/org/apache/impala/util/SentryPolicyService.java
M fe/src/main/java/org/apache/impala/util/SentryProxy.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationStmtTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
M fe/src/test/java/org/apache/impala/catalog/CatalogTest.java
14 files changed, 92 insertions(+), 137 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/11509/6
--
To view, visit http://gerrit.cloudera.org:8080/11509
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia813dcc7d3872f126865c1f8f37175201a0b10ab
Gerrit-Change-Number: 11509
Gerrit-PatchSet: 6
Gerrit-Owner: Fredy Wijaya <[email protected]>

Reply via email to