Created on 01-17-2019 12:42 AM - edited 09-16-2022 07:04 AM
When using impala under CDH 5.15, refreshing functions under specifc databases by some user will got an error like "AuthorizationException : user aaa does not have privileges to access: server" .
The system is centry enabled with kerberos.
What privileges shall we grant to the user ?
Created 01-17-2019 03:03 PM
Created 01-17-2019 04:41 PM
The user has already got ALL rights on database where the function is built
Syntax:
REFRESH FUNCTIONS db_name
Created 01-17-2019 04:52 PM
Created 01-17-2019 04:58 PM
UDF considerations:
CREATE DATABASE shared_udfs; USE shared_udfs; ...use CREATE FUNCTION statements in Hive to create some Java-based UDFs that Impala is not initially aware of... REFRESH FUNCTIONS shared_udfs; SELECT udf_created_by_hive(c1) FROM ...
Created 01-17-2019 10:46 PM
Created 01-20-2019 05:34 PM
It seems that only db_name is needed according to
https://www.cloudera.com/documentation/enterprise/5-15-x/topics/impala_refresh_functions.html
Syntax:
REFRESH FUNCTIONS db_name
And in 2.X version of impala the only way is to grant all on server to the role, while in Impala 3.0 and higher the minimum level of privileges required by refresh functions is to grant refresh on database to the role.
SQL Statement | Privileges | Scope |
REFRESH FUNCTIONS | REFRESH | DATABASE |
https://impala.apache.org/docs/build/html/topics/impala_grant.html