Class IgniteJdbcDriver

java.lang.Object
org.apache.ignite.jdbc.IgniteJdbcDriver
All Implemented Interfaces:
Driver

@AutoService(java.sql.Driver.class) public class IgniteJdbcDriver extends Object implements Driver
JDBC driver implementation for Apache Ignite 3.x.

Driver allows to get distributed data from Ignite 3 Data Storage using standard SQL queries and standard JDBC API.

Register the JDBC drivers

The JDBC driver registration is automatically done via the Java Standard Edition Service Provider mechanism. Ignite JDBC driver implements this feature and it is automatically registered for case the JDBC driver jar presents in classpath.

URL Format

The JDBC Driver supports the following URL formats to establish a connection with an Ignite 3 Database:

  1. jdbc:ignite:thin://host[:port][,host[:port][/schema][[?parameter1=value1][&parameter2=value2],...]]
  2. jdbc:ignite:thin://host[:port][,host[:port][/schema][[?parameter1=value1][;parameter2=value2],...]]
Where
  • host, port - network address of database. IPV4 and IPV6 supports both.
  • schema - define schema used by default on the connection.
  • URL can have an optional list of name-value pairs as parameters after the '?' delimiter. Name and value are separated by an '=' and multiple properties are separated either by an '&' or a ';'.
    Separate sign can't be mixed and should be either semicolon or ampersand sign.
The list of supported name value pairs:
Parameter Name Description
Common properties
connectionTimeZone Client connection time-zone ID. This property can be used by the client to change the time zone of the "session" on the server.
Affects the interpretation of dates in queries without specifying a time zone.
If not set then system default on client timezone will be used.
queryTimeout Number of seconds the driver will wait for a Statement object to execute. Zero means there is no limits.
By default no any timeout.
Connection properties
connectionTimeout Number of milliseconds JDBC client will waits for server to response. Zero means there is no limits.
By default no any timeout.
Basic authentication
username Username to login by basic authentication.
password Password to login by basic authentication.
SSL security
sslEnabled Enable ssl. Possible values:
  • true - enable SSL
  • false - disable SSL
Below security properties applies only if it enabled.
trustStorePath Path to trust store on client side.
trustStorePassword Trust store password.
keyStorePath Path to key store on client side.
keyStorePassword Key store password.
clientAuth SSL client authentication. Supported values:
  • NONE - Indicates that the client authentication will not be requested.
  • OPTIONAL - Indicates that the client authentication will be requested.
  • REQUIRE - Indicates that the client authentication will be requested and the connection will be closed if the client certificate is not trusted.
ciphers SSL ciphers list separated by comma ','.

The driver follows the following precedence (high priority goes first) for parameter value resolution: API arguments (if it available on Connection object), last instance in the connection string, properties object passed during connection.
As example:
jdbc:ignite:thin://192.168.1.1:10800/public?connectionTimeout=1000&username=root&password=pwd &connectionTimeZone=GMT+1