Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

UDF 'reflect' is not working in Sentry enabled environment.

Highlighted

UDF 'reflect' is not working in Sentry enabled environment.

New Contributor

UDF 'reflect' is not working in Sentry enabled environment.
Error:

Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException UDF reflect is not allowed

 

 

1 REPLY 1

Re: UDF 'reflect' is not working in Sentry enabled environment.

Master Guru
The reflect UDF is unsafe given its ability to execute arbitrary user code in Hive's runtime and in a Sentry environment it will be blacklisted by default to prevent its use.

Enabling it would defeat the purpose of data protection. Would you or your users be able to instead add in a custom, verified UDF that directly does whatever reflect was being indirectly used for? That'd be the safer route to go.

You can choose to whitelist the reflect UDF but I'd strongly recommend against that.
Don't have an account?
Coming from Hortonworks? Activate your account here