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.

Is it possible to execute Hive queries parallelly (single conection jdbc)

Highlighted

Is it possible to execute Hive queries parallelly (single conection jdbc)

i try to develop application java that manage data stored in hdfs by using hive jdbc to analyse this data , after that i create webservice that connect to hive and select the data that i needed , when i tested my webservice it's work but the problem when i try to call my webservice multiple time parallaly ,some of it give error and it d'ont return a result "java.sql.SQLException: org.apache.thrift.transport.TTransportException: SASL authentication not complete " error Socket closed" or "Cannot read from null inputStream" and this error from log file " Error running hive query:", i thought that hive not support parrallel execution concurrency query for single connexion jdbc , i need to know more about this issue , ,any explenation is appreciated ;

1 REPLY 1
Highlighted

Re: Is it possible to execute Hive queries parallelly (single conection jdbc)

You can have multiple parallel queries but you should have one JDBC connection for each. This is the same as for other databases. ( some jdbc drivers support parallel queries over one connection but many like Netezza will not ) Typically some connection pooling is used. Either a fixed one like below Or implement it manually with a pool Singleton that manages x Hive connections.

http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

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