Closed momiji closed 3 years ago
Hi,
Great work, however adding new custom drivers is not as simple as it is currently explained in the wiki.
In our use case, we wanted to add the phoenix query server driver to dbeaver/cloudbeaver.
You need to add a generic driver in dbeaver/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml, something like this:
<driver id="phoenix-qs" label="Phoenix Query Server" icon="icons/phoenix_icon.png" iconBig="icons/phoenix_icon_big.png" class="org.apache.phoenix.queryserver.client.Driver" sampleURL="jdbc:phoenix:thin:url=http://{host}[:{port}];serialization=PROTOBUF" defaultPort="8765" webURL="http://phoenix.apache.org/" description="Phoenix Query Server driver" categories="hadoop" anonymous="true" > <file type="jar" path="drivers/phoenix-qs" bundle="drivers.phoenix-qs"/> </driver>
As explained in the wiki, one need to update plugin.xml:
... <resource name="drivers/phoenix-qs"/> ... <bundle id="drivers.phoenix-qs" label="Phoenix with Query Server drivers"/> ... <driver id="generic:phoenix-qs"/> ...
Also add a new phoenix-qs folder containing the following pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>drivers.phoenix-qs</artifactId> <version>1.0.0</version> <parent> <groupId>io.cloudbeaver</groupId> <artifactId>drivers</artifactId> <version>1.0.0</version> <relativePath>../</relativePath> </parent> <properties> <deps.output.dir>phoenix-qs</deps.output.dir> </properties> <dependencies> <dependency> <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-queryserver-client</artifactId> <version>4.14.1-HBase-1.1</version> </dependency> </dependencies> </project>
And finally add the new folder in the modules list in pom.xml:
... <module>phoenix-qs</module> ...
All other instructions for building project are correct and work like a charm.
Regards, Chris
Thank you for your report.
New article was added: https://github.com/dbeaver/cloudbeaver/wiki/Adding-new-database-drivers
Thanks, nice to see my contribution helped! Good work :)
Hi,
Great work, however adding new custom drivers is not as simple as it is currently explained in the wiki.
In our use case, we wanted to add the phoenix query server driver to dbeaver/cloudbeaver.
You need to add a generic driver in dbeaver/plugins/org.jkiss.dbeaver.ext.generic/plugin.xml, something like this:
As explained in the wiki, one need to update plugin.xml:
Also add a new phoenix-qs folder containing the following pom.xml:
And finally add the new folder in the modules list in pom.xml:
All other instructions for building project are correct and work like a charm.
Regards, Chris