Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎10-18-2015

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

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

 

 

Posts: 1,886
Kudos: 425
Solutions: 300
Registered: ‎07-31-2013

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

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.
Announcements