Support Questions

Find answers, ask questions, and share your expertise

Passing server side query options to Impala using Hive-JDBC driver

Explorer

I use mt_dop=n parameter extensively and want to pass it from connection string.

While using Cloudera Impala driver, the below query string works:

jdbc:impala://192.168.123.123:21050/;mt_dop=8

 

However when we use Hive JDBC driver, the below query string doesnt work:

jdbc:hive2://192.168.174.72:21050/;auth=noSasl;mt_dop=8

 

I have tried lots of alternatives for Hive connection string like 

jdbc:hive2://192.168.174.72:21050/;auth=noSasl?mt_dop=8

jdbc:hive2://192.168.174.72:21050/;auth=noSasl#mt_dop=8

 

but none of them work.

 

Can anyone give me a way out to pass this query option using Hive JDBC driver ?

2 REPLIES 2

Hi Sanjay,

  Cloudera doesn't support using the Hive JDBC driver so it may not work in all cases - I think it is something that's provided by the Apache Hive project.

Explorer

As per 

https://www.cloudera.com/documentation/enterprise/5-9-x/topics/impala_jdbc.html#jdbc_driver_choice 

In Impala 2.0 and later, you have the choice between the Cloudera JDBC Connector and the Hive 0.13 JDBC driver. Cloudera recommends using the Cloudera JDBC Connector where practical.

 

I take this to mean that Impala should support both drivers.