nebula-contrib/nebula-jdbc

Driver doesn't support STANDARD JDBC url

corradomio opened this issue · 5 comments

After the class registration inside the JDBC DriverManager, it is not possible to use a ""standard JDBC url"" as:

DriverManager.getConnection("jdbc:nebula://host:port/graphSpace", ...)

In the attached file there is the minimum changes necessary to support this syntax
NebulaDriver-java.txt

The FIRST problem IS NOT that it is possible to instantiate a "NebulaDriver" with the list of "ip:port" to use BUT that the driver can be used by a 3rd-part tool (for example in Aqua Data Studio) that uses the STANDARD behavior of a JDBC driver.
The SECOND problem is that the nebula-graph database NOT NECESSARY is installed in the same machine (this means that IT IS NOT POSSIBLE to use "127.0.0.1"), BUT it can be installed in an another machine located in the network (with an another IP:PORT).

nebula-jdbc is encapsulated based on nebula-java, due to the initialization of NebulaPool and JDBC driver loading sequence, the "standard JDBC url" form you mentioned above is not supported (see here). We will give more thoughts on this.
You can use nebula-jdbc as Usage showed, make a Properties to store all settings you need and instantiate NebulaDriver with it.

I totally agree with corradomio. Using a 3rd party tool to connect to NebulaGraph by jdbc is not possible now. Could you give it a priority? Thanks.

I had created a PR for better collaboration on this, now it's exactly the change proposed by @corradomio .

resolved it in #38