apache / druid

Apache Druid: a high performance real-time analytics database.
https://druid.apache.org/
Apache License 2.0
13.46k stars 3.7k forks source link

Namespaced Query Time Lookups might not handle drivers correctly #2345

Closed drcrallen closed 1 year ago

drcrallen commented 8 years ago

As per https://groups.google.com/d/msg/druid-user/3Iqi6yYG5pA/MmWDZW0BBAAJ there might be a problem in the JDBCExtractionNamespaceFunctionFactory whereby the JDBC driver is not registered with the DBI. It is notable that MySQLConnector and PostgreSQLConnector have explicit registering of the driver in part of the constructor.

A few issues arise here:

  1. The classloaders for the connector extensions are isolated from the namespaced lookup extension, this means that even if the proper registering were enforced, it is not guaranteed that the namespaced lookup extension would be using the registration from the mysql (or postgress) extension.
  2. The connectors probably need more abstraction to allow non-metadata stuff to utilize them.
  3. The JDBCExtractionNamespaceFunctionFactory would need a way to either A) pull from a extension config (assuming all lookups will use the same JDBC URI), or B) have a means to plug into an extension's JDBC driver registry so that different instances of namespaces can load up their drivers properly.
  4. ClassLoader and JDBC driver dependencies are notoriously difficult to catch in unit tests.
MdeArcayne commented 8 years ago

So #2819 does not fix this yet? So far Its been impossible for me to use a JDBC lookup, same reason as the original group post. Has anyone succeeded in using them?

b-slim commented 8 years ago

Sorry @MdeArcayne #2819 will have the same driver issue.

github-actions[bot] commented 1 year ago

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.