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.

Connecting to Hive/Impala from spark using jdbc

Highlighted

Connecting to Hive/Impala from spark using jdbc

Explorer

Hello Team,

 

I have a CDH 5.15 cluster with Sentry, Kerberos and TLS enabled.

 

We have blocked Hive cli for all users except hive, hue and sentry. We are working on below and need help for the same.

 

1. We do not want spark to connect hive metastore which will bypass Hiveserver2 and authorization defined in sentry will not work.

2. Sample snippet/example/code for spark2-shell and spark2-submit to connect hive using jdbc

3. Sample snippet/example/code for spark2-shell and spark2-submit to connect impala using jdbc

 

Any other way apart from JDBC to connect hive from spark which will go through hiveserver2 for authorization check?

 

- VIjay M