Jdbc settings for connecting to Impala - jdbc

What is the combination of driver and jdbc URL to use for CDH5 (I am on CDH5.3)?
I have tried a few including:
jdbc:hive2://myserver:21050/;auth=noSasl
And with the following driver:
org.apache.hive.jdbc.HiveDriver
I have added
/opt/cloudera/parcels/CDH/lib/impala/lib/*:/opt/cloudera/parcels/CDH/lib/hive/lib/*
to the classpath (but still no success)
The result is:
java.sql.SQLException: No suitable driver found for jdbc:hive2://myserver:20150/;auth=noSasl

Firstly, make sure you're using the correct driver. You should use the Impala JDBC driver (rather than the Hive driver).
Then you should be able to use the com.cloudera.impala.jdbc3.Driver driver with a connection string like: jdbc:impala://host:21050
The Impala JDBC driver guide has more details and examples.

Related

What to put in JDBC Driver Class when connecting JMeter with Azure Databricks cluster

What to put in JDBC driver class? enter image description here
Little help I could find on internet so I am asking for help.
Perhaps my Internet is better than yours because I can find a little bit more "help".
In the Configure the Databricks ODBC and JDBC drivers documentation chapter I can see JDBC Driver Guide section which looks like:
For more information about the JDBC driver, refer to the installation and configuration guide. Find the Databricks JDBC driver installation and configuration guide in the docs directory of the driver package.
In the docs directory of the downloaded JDBC Driver there is Databricks JDBC Driver Install and Configuration Guide.pdf file.
In the Registering the Connector Class chapter of this file it suggests to use com.databricks.client.jdbc.Driver as the classname
See Using JDBC Sampler in JMeter article for more hints on database testing with JMeter.

Hive JDBC connection is not happening through JMeter

JDBC connection config details are provided as per QA envirnoment
provided the queries details for fetching the details
facing errors while fetching the details, Please help me here , I have added all necessary jar files which is the latest updated versions
Looking into Hive JDBC driver source:
Utils.verifySuccess(openResp.getStatus());
if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
throw new TException("Unsupported Hive2 protocol");
}
it seems that your JDBC driver version doesn't match the server-side version, you need to download exactly the same version of the JDBC driver which matches your server installation.
If you cannot figure out the correct version of server you can enable debug logging for Hive JDBC driver and inspect jmeter.log file for any clues.
In the meantime you can try use hive instead of hive2 in the JDBC URL, however it might have negative impact to the results as they won't be that realistic

Flyway: use Oracle OCI

Flyway's primary Oracle driver is JDBC Thin, configured as below:
URL jdbc:oracle:thin:#//host:port/service or jdbc:oracle:thin:#tns_entry.
JAR's are ojdbc8.jar and orai18n.jar, main class is: oracle.jdbc.OracleDriver.
Is it possible to use Oracle OCI driver instead of JDBC Thin? if yes then how to configure this?

JDBC thin driver

The question I have is why does Oracle SQL developer does not require Oracle client installed on local?? I searched on the internet and found that it makes use of JDBC thin driver. Can someone please throw some light on this topic?
The Oracle thin driver is a so-called JDBC Type 4 driver, which is implemented purely in Java without native dependencies (.dll/.so), and has a full implementation of the Oracle wire protocol. In other words the thin driver does not require the Oracle client installed, as it doesn't use it.
There are also JDBC Type 2 drivers which do use native dependencies; Oracle has a Type 2 driver as well which is known as the Oracle JDBC OCI driver. This driver uses a JDBC url that is prefixed with jdbc:oracle:oci:.
The Type 1 and Type 3 drivers I ignore because they are hardly relevant these days.

What is difference between oracle.jdbc.xa.client.OracleXADataSource and oracle.jdbc.pool.OracleDataSource

I am trying to understand the difference between XA vs Non XA JDBC datasource. Also how do I know which type and version of JDBC dtriver is used. I am currently on 10.3 weblogic and trying some tet to kill long running queries using setQueryTimeout, which isnt seem to be reliable with OracleXADataSource as it is only working the first time and not always.
Sorry for this basic question but I am new to Weblogic Datasource configuration
Thanks
XA jdbc drivers are used to implement two-phase commit, meaning the two remote resources are part of the same transaction. Java specifies an implementation of this via JTA. A good reading is e.g. http://www.javaworld.com/javaworld/jw-07-2000/jw-0714-transaction.html; if you google for 'xa jdbc driver' you'll find plenty more info.
You should not use the XA driver if not necessary. I remember reading that there are some problems with them.
To identify JDBC driver your WLS is using, go to the <domain_dir>/config/jdbc and open the data souce file, check the driver-name value in the file.
To identify the Driver version, check from which .jar is the driver being loaded (run the WLS with -verbose:class)- the name of the jar will contain the version number. Also, you can use java -jar my-jdbc-file.jar which will print the driver version. The OJDBC drivers are usually stored in a file named ojdbc6.jar or ojdbc7.jar, etc.

Resources