Hello Hao Hao, I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/10111 to review the following change. Change subject: KUDU-2191 (n/m): PoC: disallow Kudu alter column, create table operations from Hive ...................................................................... KUDU-2191 (n/m): PoC: disallow Kudu alter column, create table operations from Hive This commit makes it more difficult for processes or users who are not the Kudu Master to alter the columns of Kudu table HMS entries through Hive APIs. The bulk of this patch is introducing a new environment context key/pair ('kudu.master_event=true') which is sent by the Kudu Master with every HMS create/drop/alter table call. The KuduMetastorePlugin checks that this property is set appropriately when operations modify a Kudu table HMS entry. The result is any attempt to create a table through Hive APIs or alter the columns of a Kudu table through Hive APIs will fail. These operations can not be supported because Hive lacks the DDL syntax and HMS APIs to support necessary Kudu-specific table and column options. It's possible for a user to spoof this environment context entry, but it's a big enough roadblock that it should prevent accidental DDL operations. Change-Id: Idc39b1df07952d37e9ce93f1673aad535767a8ac --- M java/kudu-hive/src/main/java/org/apache/kudu/hive/metastore/KuduMetastorePlugin.java M java/kudu-hive/src/test/java/org/apache/kudu/hive/metastore/TestKuduMetastorePlugin.java M src/kudu/hms/hms_catalog.cc M src/kudu/hms/hms_catalog.h M src/kudu/hms/hms_client-test.cc M src/kudu/hms/hms_client.cc M src/kudu/hms/hms_client.h M src/kudu/integration-tests/master_hms-itest.cc 8 files changed, 103 insertions(+), 29 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/11/10111/1 -- To view, visit http://gerrit.cloudera.org:8080/10111 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idc39b1df07952d37e9ce93f1673aad535767a8ac Gerrit-Change-Number: 10111 Gerrit-PatchSet: 1 Gerrit-Owner: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>