[ 
https://issues.apache.org/jira/browse/DRILL-6738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arina Ielchiieva updated DRILL-6738:
------------------------------------
    Description: 
Currently JDBC storage plugin uses DBCP2 for the connection pooling, but it 
wouldn't validate the connection's still available or not, and it'd just spit 
the connection lost error.

We should be able to have a validationQuery option described 
[here|https://commons.apache.org/proper/commons-dbcp/configuration.html] in 
Drill's JDBC storage plugin configuration.

*NOTE*
In DRILL-7639 BasicDataSource was replaced with Hikari, sourceParameters 
sections remains and allows to configure data source, Hikari related 
configuration properties should be used instead. List of Hikari properties: 
https://github.com/brettwooldridge/HikariCP.

{{connectionTestQuery}} should be used instead of {{validationQuery}}. Example 
of configuration:
{noformat}
{
  "type": "jdbc",
  "driver": "org.postgresql.Driver",
  "url": "jdbc:postgresql://localhost:5959/my_db?defaultRowFetchSize=2",
  "username": "my_user",
  "password": "my_pass",
  "caseInsensitiveTableNames": false,
  "sourceParameters": {
    "connectionTestQuery": "select * from information_schema.collations"
  },
  "enabled": true
}
{noformat}


  was:
Currently JDBC storage plugin uses DBCP2 for the connection pooling, but it 
wouldn't validate the connection's still available or not, and it'd just spit 
the connection lost error.

We should be able to have a validationQuery option described 
[here|https://commons.apache.org/proper/commons-dbcp/configuration.html] in 
Drill's JDBC storage plugin configuration.



> validationQuery option for JDBC storage plugin
> ----------------------------------------------
>
>                 Key: DRILL-6738
>                 URL: https://issues.apache.org/jira/browse/DRILL-6738
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - JDBC
>    Affects Versions: 1.14.0
>         Environment: Apache Drill version 1.14.0 running on CentOS 7.0.1406.
> MySQL version 5.5.43 running on CentOS 6.4.
> MySQL connector/j version 5.1.44.
>            Reporter: Cheolgoo Kang
>            Assignee: Arina Ielchiieva
>            Priority: Major
>             Fix For: 1.18.0
>
>
> Currently JDBC storage plugin uses DBCP2 for the connection pooling, but it 
> wouldn't validate the connection's still available or not, and it'd just spit 
> the connection lost error.
> We should be able to have a validationQuery option described 
> [here|https://commons.apache.org/proper/commons-dbcp/configuration.html] in 
> Drill's JDBC storage plugin configuration.
> *NOTE*
> In DRILL-7639 BasicDataSource was replaced with Hikari, sourceParameters 
> sections remains and allows to configure data source, Hikari related 
> configuration properties should be used instead. List of Hikari properties: 
> https://github.com/brettwooldridge/HikariCP.
> {{connectionTestQuery}} should be used instead of {{validationQuery}}. 
> Example of configuration:
> {noformat}
> {
>   "type": "jdbc",
>   "driver": "org.postgresql.Driver",
>   "url": "jdbc:postgresql://localhost:5959/my_db?defaultRowFetchSize=2",
>   "username": "my_user",
>   "password": "my_pass",
>   "caseInsensitiveTableNames": false,
>   "sourceParameters": {
>     "connectionTestQuery": "select * from information_schema.collations"
>   },
>   "enabled": true
> }
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to