pgspider / jdbc_fdw

JDBC Foreign Data Wrapper for PostgreSQL
Other
69 stars 23 forks source link

Allow specifying JVM classpath by environment #16

Closed usimd closed 1 year ago

usimd commented 1 year ago

There are use cases where specification of multiple directories to search for JVM libraries are helpful. In our case, we are installing a large client driver package to our image and need to add multiple directories to the classpath in order for the JDBC driver to pick up its dependencies.

This adds an option to define an environment variable CLASSPATH according to the JVM documentation and pass its value as VM arguments.

jopoly commented 1 year ago

Hello @usimd ,

Thank you for the PR.

In our case, we are installing a large client driver package to our image and need to add multiple directories to the classpath in order for the JDBC driver to pick up its dependencies.

Could you tell me more detail about your context? What client driver package do you need to install? Could you share the procedure to recreate your case?

usimd commented 1 year ago

We are fetching data via Drill from a MapR DB. They provide a customized JDBC driver which we're extracting into our Postgres container images, consisting of many JARs. In order for the JVM to pick up all those dependencies correctly, we must enumerate them (or correctly specify the path to the folder where the JARs reside).

jopoly commented 1 year ago

Sorry for late response. I have comment on your PR. Please check it.

weiting1lee commented 1 year ago

@usimd Thank you for your contribution. I will merge the PR. @jopoly Thanks.