Hello Andrew Wong,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13600
to look at the new patch set (#2).
Change subject: wip: [sentry] use bulk Sentry API for ListTables
......................................................................
wip: [sentry] use bulk Sentry API for ListTables
This patch uses the newly introduced ListPrivilegesByAuthorizablesAndUser
for authorizing ListTables to try to improve the perfomance. However,
testing with mini sentry which uses derby, the performance has not been
improved much. Without this patch:
Iterating through many databases:
$ ./bin/sentry_authz_provider-test --gtest_filter=*ListTablesBench*
--num_databases=300 --num_tables_per_db=1 --has-db-privileges=false
sentry_authz_provider-test.cc:413] Time spent Listing tables: real 24.954s user
0.127s sys 0.003s
$ ./bin/sentry_authz_provider-test --gtest_filter=*ListTablesBench*
--num_databases=1 --num_tables_per_db=600 --has-db-privileges=false
sentry_authz_provider-test.cc:413] Time spent Listing tables: real 48.386s user
0.174s sys 0.005s
With this patch:
$ ./bin/sentry_authz_provider-test --gtest_filter=*ListTablesBench*
--num_databases=300 --num_tables_per_db=1 --has-db-privileges=false
sentry_client.cc:182] Time spent list Sentry privileges by authorizables and
user: real 21.364s user 0.004s sys 0.000s
sentry_authz_provider-test.cc:414] Time spent Listing tables: real 21.393s user
0.018s sys 0.000s
$ ./bin/sentry_authz_provider-test --gtest_filter=*ListTablesBench*
--num_databases=1 --num_tables_per_db=600 --has-db-privileges=false
sentry_client.cc:182] Time spent list Sentry privileges by authorizables and
user: real 40.920s user 0.006s sys 0.000s
sentry_authz_provider-test.cc:414] Time spent Listing tables: real 40.959s user
0.025s sys 0.001s
Change-Id: I4c17befbcd423637f97971672fe8bca40311d214
---
M src/kudu/master/sentry_authz_provider-test.cc
M src/kudu/master/sentry_authz_provider.cc
M src/kudu/master/sentry_authz_provider.h
M src/kudu/master/sentry_privileges_fetcher.cc
M src/kudu/master/sentry_privileges_fetcher.h
5 files changed, 274 insertions(+), 95 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/00/13600/2
--
To view, visit http://gerrit.cloudera.org:8080/13600
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4c17befbcd423637f97971672fe8bca40311d214
Gerrit-Change-Number: 13600
Gerrit-PatchSet: 2
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>