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.

How to connect to Spark2 Thrift Server via JDBC

Solved Go to solution

How to connect to Spark2 Thrift Server via JDBC

Super Collaborator

I want to connect Aqua Data Studio to the Spark2 Thrift Server on our cluster.

Can someone point me in the right direction as far as connection string and drivers, etc?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to connect to Spark2 Thrift Server via JDBC

Super Collaborator

I figured this one out - the hive-jdbc.jar driver that comes with HDP 2.6.1 is not compatible with the Spark2 Thrift Server.

It's also not compatible with the Hive 1.2 that ships with 2.6.1.

If you just grab an older version of the driver, it works as expected, using the connection settings described above.

Port 10016 for Spark2, port 10015 for the original...

3 REPLIES 3

Re: How to connect to Spark2 Thrift Server via JDBC

Super Collaborator

So far, I've figured out that a connection string like this is what you need:

jdbc:hive2://<thrift server>:10016/<dbname>

And the driver class is just like Hive: org.apache.hive.jdbc.HiveDriver

However, the hive-jdbc.jar file is supposed to work, but doesn't.

I get this error:

Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})

Re: How to connect to Spark2 Thrift Server via JDBC

Super Collaborator

I figured this one out - the hive-jdbc.jar driver that comes with HDP 2.6.1 is not compatible with the Spark2 Thrift Server.

It's also not compatible with the Hive 1.2 that ships with 2.6.1.

If you just grab an older version of the driver, it works as expected, using the connection settings described above.

Port 10016 for Spark2, port 10015 for the original...

Re: How to connect to Spark2 Thrift Server via JDBC

New Contributor

Which files did you end up using? I looked here http://repo.hortonworks.com/content/repositories/releases/org/apache/hive/hive-jdbc/ and there are tons of them.

Don't have an account?
Coming from Hortonworks? Activate your account here