09-25-2018 04:08 PM
Just following up here, I just tested this on Impala version 2.13 (dev version) and I cannot reproduce the ability to alter table set tblproperties to rename the Kudu table name even after altering the Impala table name. Is anyone else able to reproduce this? I get the following error:
> alter table mpercy_k2 set tblproperties('kudu.table_name'='impala::default.mpercy_k2');
Query: alter table mpercy_k2 set tblproperties('kudu.table_name'='impala::default.mpercy_k2')
ERROR: AnalysisException: Not allowed to set 'kudu.table_name' manually for managed Kudu tables .
However this is by design from what I have discussed with some others.
I think the "bug" is that Impala alter table doesn't automatically rename the Kudu table internally. However it would be a security problem to be able to alter the kudu table name with tblproperties because Sentry applies the security rules to the Impala table name.
09-28-2018 11:36 AM - edited 09-28-2018 11:36 AM
FYI, I think my reply from 9/21 was wrong. As far as I can tell, the rules work as follows:
1. If the Kudu table is managed by Impala, it's not possible to change the kudu.table_name and kudu.master_addresses properties. This is the case when it's not an EXTERNAL table. See https://issues.apache.org/jira/browse/IMPALA-5654 for more information on that.
I have filed an improvement request to track automatically renaming the Kudu table when the Impala table is renamed to keep them in sync, but right now it's not possible. See https://issues.apache.org/jira/browse/IMPALA-7640 for more information.
2. If you have an EXTERNAL table (Kudu table not managed by Impala) then you are able to alter the kudu.table_name table property.
The above was tested on a non-secure cluster, and I would be interested to hear if others' experiences are the same as mine were even on a secured cluster. However I believe the behavior is the same in both cases.
Hope this helps,