-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28800/
-----------------------------------------------------------
Review request for sentry.
Repository: sentry
Description
-------
Currently, when get the metadata from hive, eg, "show tables", "show
databases". Sentry will filter the result and output the authorized entities.
There will be many RPC calls when filtering the result. The related code is in
HiveAuthzBinding, for example, in filterShowTables:
......
for (String tableName : queryResult) {
......
hiveAuthzBinding.authorize(operation, tableMetaDataPrivilege, subject,
inputHierarchy,
outputHierarchy, providedPrivileges);
......
}
......
hiveAuthzBinding.authorize will get the privileges from sentry service, if
there are many tables in the hive, the filtering process will spend much time.
Considering sentry also need to filter the column, HiveAuthzBinding should be
improved to reduce the number of rpc calls when doing the filter.
Diffs
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
97ef3b8
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingPreExecHook.java
813200a
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBinding.java
b4b69e1
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
e7f96c1
sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzBindings.java
d41f6cf
sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java
a88d2f8
sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/NoAuthorizationProvider.java
a814527
sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ResourceAuthorizationProvider.java
6449405
Diff: https://reviews.apache.org/r/28800/diff/
Testing
-------
Thanks,
Colin Ma