Hello Andrew Wong, Hao Hao,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/11398
to review the following change.
Change subject: HMS integration: set table owner field in HMS table metadata
......................................................................
HMS integration: set table owner field in HMS table metadata
Other systems use table ownership for purposes like assigning
privileges. This patch sets the owner field in the HMS for Kudu tables
to the client's user name. A follow-up patch will add additional APIs to
the client CreateTable builders which will allow clients to override the
owner, for situations in which the client is actually proxying through
the table creation on behalf of a different user.
The HMS fix tool will create HMS table metadata for Kudu tables which
are missing it. This replacement table metadata will omit the table
owner, since it can't be reconstructed just from the Kudu table
metadata. I considered defaulting to the logged-in user which is fixing
hte metadata (the admin user), but this could result in privilege
escalation if the admin user had rights to create/repair HMS tables, but
not read/write access to the table. As such I think it's safer to omit
table ownership information in this case. An admin can re-assign the
table ownership through Beeline or Impala given sufficient credentials.
Change-Id: I1a25aa0bb52bdd28df28a078fe91f55db9e29482
---
M src/kudu/hms/hms_catalog-test.cc
M src/kudu/hms/hms_catalog.cc
M src/kudu/hms/hms_catalog.h
M src/kudu/integration-tests/master_hms-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_hms.cc
7 files changed, 88 insertions(+), 36 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/11398/1
--
To view, visit http://gerrit.cloudera.org:8080/11398
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a25aa0bb52bdd28df28a078fe91f55db9e29482
Gerrit-Change-Number: 11398
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Burkert <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>