Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SparkSQL Connection error: v2.3.2 #297

Open
binodsarkar opened this issue Dec 16, 2019 · 10 comments
Open

SparkSQL Connection error: v2.3.2 #297

binodsarkar opened this issue Dec 16, 2019 · 10 comments
Labels
driver:hive Issues relating to the Apache Hive driver enhancement New feature proposal help wanted Community contributions are welcome.

Comments

@binodsarkar
Copy link

binodsarkar commented Dec 16, 2019

SparkSQL Connection error
Spark sql connection through thrift s not working. Please find the error

Error while loading DB schema
Error: TApplicationException: Required field 'client_protocol' is unset!
Struct:TOpenSessionReq(client_protocol:null, username:anonymous, password:)
at Client.OpenSession (.../node_modules/jshs2/lib/HiveConnection.js:57:18)
at client._reqs.(anonymous function) (.../node_modules/thrift/lib/nodejs/lib/thrift/connection.js:151:13)
at exports.Client.TCLIServiceClient.recv_OpenSession (.../node_modules/jshs2/idl/Thrift_0.9.3_Hive_2.1.1/TCLIService.js:2327:12)
at .../node_modules/thrift/lib/nodejs/lib/thrift/connection.js:157:41
at .../node_modules/thrift/lib/nodejs/lib/thrift/buffered_transport.js:48:5
at frames.filter.map.f (.../node_modules/@cubejs-backend/hive-driver/driver/TSaslTransport.js:105:52)
at Array.map (<anonymous>)
at Socket.<anonymous> (.../node_modules/@cubejs-backend/hive-driver/driver/TSaslTransport.js:105:43)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:287:12)
@tromika
Copy link

tromika commented Dec 16, 2019

Thrift_0.9.3_Hive_2.1.1

Seems there is a version mismatch between the client and the thrift server.

@binodsarkar
Copy link
Author

binodsarkar commented Dec 16, 2019

Thrift_0.9.3_Hive_2.1.1

Seems there is a version mismatch between the client and the thrift server.

In that case how to upgrade cubejs hive version? Because my warehouse version in 2.3.2 or any idea how to use sparksql jdbc driver?

And I have tested after downgrading hive spark etc on my local m/c but still not working

@tromika
Copy link

tromika commented Dec 16, 2019

by default 2.3.4 bundled see https://github.com/cube-js/cube.js/tree/master/packages/cubejs-hive-driver/idl/Hive_2.3.4. So you have to replace the files with the 2.3.2 version inside your cubejs installation.

@tromika
Copy link

tromika commented Dec 16, 2019

I guess it doesn't solve your problem but might solve someone's in the future, you can find older hive and thrift idls in https://github.com/imjuni/jshs2/tree/master/idl

@binodsarkar
Copy link
Author

by default 2.3.4 bundled see https://github.com/cube-js/cube.js/tree/master/packages/cubejs-hive-driver/idl/Hive_2.3.4. So you have to replace the files with the 2.3.2 version inside your cubejs installation.

Connection error for bug fixing version change?

@binodsarkar
Copy link
Author

binodsarkar commented Dec 16, 2019

I guess it doesn't solve your problem but might solve someone's in the future, you can find older hive and thrift idls in https://github.com/imjuni/jshs2/tree/master/idl

Sorry, the exact version 2.3.4 also not resolved my issue. I think I am missing any simple thing? And Any IDEA how to use spark sql jdbc because in my another node application jdbc works fine and I have also seen that there is a driver for sparksql in cubejs cubejs jdbc
https://github.com/cube-js/cube.js/blob/fd39c95136b00668026999faad5d19712c7df65d/packages/cubejs-jdbc-driver/driver/JDBCDriver.js#L60

@paveltiunov
Copy link
Member

@binodsarkar Hey Binod! Hive is very sensitive with these version stuff. You should have correct IDL in place: https://github.com/cube-js/cube.js/tree/master/packages/cubejs-hive-driver#contributing-missing-hive-protocol.

On JDBC side: unfortunately node-maven isn't able to install it due to it doesn't support variables AFAIK.

@paveltiunov paveltiunov changed the title SparkSQL Connection error SparkSQL Connection error: v2.3.2 Dec 20, 2019
@CBox
Copy link

CBox commented Apr 20, 2020

Hey, just to make sure what version of SparkSQL is working with CubeJS?

@tromika
Copy link

tromika commented Apr 20, 2020

Hi @CBox, we are on 2.3.x and it's working properly. I can't say anything about 2.4.x or 3.x unfortunately but keep in mind for the CubeJs and Spark integration the Hive versions matters.

@keydunov keydunov removed the driver label Oct 27, 2020
@paveltiunov paveltiunov added help wanted Community contributions are welcome. bug Something isn't working enhancement New feature proposal and removed bug Something isn't working labels Nov 25, 2020
@paveltiunov
Copy link
Member

This issue is currently outside of our roadmap and we're looking for contributions here!

@hassankhan hassankhan added the driver:hive Issues relating to the Apache Hive driver label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver:hive Issues relating to the Apache Hive driver enhancement New feature proposal help wanted Community contributions are welcome.
Projects
None yet
Development

No branches or pull requests

6 participants