GithubHelp home page GithubHelp logo

Comments (10)

aadrian avatar aadrian commented on May 20, 2024

http://www.jcommander.org/#_lists
or
http://www.jcommander.org/#list-value

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

I updated the issue and jcommander doesnt solve the issue. But that might be because I was unclear about the issue.

from schemaspy.

rafalkasa avatar rafalkasa commented on May 20, 2024

@npetzall -loadjars parameter was added to the SchemaSpy to resolve issue with Cloudera Impala JDBC driver. You cna read more here - Support for Impala #64

Now -loadjars is loading only additional drivers that are in the same folder where JDBC driver it is, nothing more nothing less.

Based on my understanding you would like to extend -dp functionality in a little different manner for other purposes to cover other JDBC cases similar to Cloudera Impala.

I will try to thnik about this change and maybe we can improve this a little

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

Impala wouldn't actually need a loadjars since the jars could have been specified.
Jar1:Jar2:Jar3 etc etc.

So having -loadjars which is incompatible with the above seems complex.

I'll have another look at it tonight.

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

-dp

Allows to specify driverjar and additional jars
format:
lib/one.jar
or
lib/one.jar:lib/two.jar:lib/three.jar

-loadjars

Allow to specify driverjar and it will load all jars in same folder (now it actually loads .?ar(jar,war,nar etc)
However it puts constraint on -dp path it can not be in de second form:
lib/one.jar:lib/two.jar,lib/three.jar

The proposed solution with a small twist.
-dp would allow specific jar, list of jars lib/one.jar:lib/two.jar:lib/three.jar:lib/anyOtherTypeOfFile
and even list of directories lib:ext-lib.

If -dp element is a directory it will include all .?ar file and even the directory to the classpath of driver loading.

So instead of listing jars or even a single jar and adding -loadjars true, it would load them.

Everything above would just be: -dp lib

from schemaspy.

rafalkasa avatar rafalkasa commented on May 20, 2024

@npetzall thank you for detailed explanation and description. I fully agree with you that it will be much easier for SchemaSpy users to have only one parameter -dp and few specyfic option how to load the driver or additional files related to it.

I would like to start working on this enhancement after when I will merge changes made by @Riggs333 to the Config class with new JCommander added to the project.

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

@rafalkasa this can be done right now, the change is local to DbDriverLoader. You can leave the -loadjars option and it can be removed after his PR. DbDriverLoader will just stop using loadjars flag.

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

@rafalkasa Ok if i grab this one?

from schemaspy.

rafalkasa avatar rafalkasa commented on May 20, 2024

Yes sure you can grab this one, I'm more than happy that you have energy and time to working on SchemaSpy

from schemaspy.

npetzall avatar npetzall commented on May 20, 2024

I haven't verified order since it hasn't been an issue.
We need to talk about classloaders and not classpaths.

When the driver is loaded we create a new classloaders if -dp has resulted in existing path(s).
This classloaders uses the classloaders of schemaspy as it's parent classloaders so they are chained.

I did a quick look in Class.java and sadly it's a native call. But what I've heard about classloading is that it checks the parent first. Child first is normally found in applicationservers like tomcat to avoid static classes to be shared between applications.

So there is no requirement to use dp or that it needs to point at a file not on classpaths.

This fact is used in the docker image which doesn't use -dp but classpath.

So if order is truly important I can verify it.
Any change in order would require a use-case just so that we can implement it as a test, describing why we want that behavior.

from schemaspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.