Skip to content

Namespaced Query Time Lookups might not handle drivers correctly #2345

@drcrallen

Description

@drcrallen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions