Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to connect to Spark2 Thrift Server via JDBC

avatar
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

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

View solution in original post

3 REPLIES 3

avatar
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})

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

avatar
Explorer

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.