clintropolis opened a new pull request #11402:
URL: https://github.com/apache/druid/pull/11402


   ### Description
   This PR adds support for using MariaDB java connector (and by extension 
database) using the Druid MySQL metadata extension, as well as JDBC connection 
string uri validation for lookups and SQL ingestion.
   
   For the metadata connector, a new config, 
`druid.metadata.mysql.driver.driverClassName` has been added, which can be set 
to `org.mariadb.jdbc.Driver` for example to allow use of the MariaDB 
Connector/J. 
   
   I got a bit carried away, and now JDBC connection string uri validation for 
all supported databases has been moved into `druid-core` and is performed with 
reflection, so the logic is no longer duplicated across the lookup JDBC 
handling and SQL firehose logic and is instead centralized in 
`ConnectionUriUtils`.
   
   The Docker integration tests have been modified to accept an additional 
environment variable, `MYSQL_DRIVER_CLASSNAME`, and setting it to 
`org.mariadb.jdbc.Driver` will kick the test container into a mode where they 
load the mariadb connector jar instead of mysql jar and use that instead. I 
duplicated the 'query' integration test to run against mariadb, which at least 
gives coverage of the metadata connector, but I have tested jdbc lookups and 
sql ingestion manually as well to ensure that the property validation stuff is 
functional.
   
   It looked like there are a handful of documentation changes that should be 
made, which I will address in a follow-up PR if that is acceptable to reviewers.
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to