Dremio ARP -- drill connector issue

Hi, All, I am trying to develop a Dremio Connector to Apache Drill based on the example:

After I deployed the drill jdbc jar and my connector jar, I got an exception connection is not valid, I think the reason is related to the connection string I am using for drill:
jdbc:drill:drillbit=localhost:31010
for this connection string, there is no database name in the end, in the sqlite example,
@VisibleForTesting
public String toJdbcConnectionString() {
final String database = checkNotNull(this.database, “Missing database.”);

return String.format("jdbc:sqlite:%s", database);

}
the database variable is the database name, but for drill, the connection string does not require that.

so my question is does the ARP support Drill for connector?

Thanks

The full exception stack trace is:

ERROR c.d.e.store.jdbc.JdbcStoragePlugin - Connection is not valid.

java.lang.NullPointerException: null

at com.dremio.exec.store.jdbc.JdbcStoragePlugin.getState(JdbcStoragePlugin.java:360) ~[dremio-ce-jdbc-plugin-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.ManagedStoragePlugin.setLocals(ManagedStoragePlugin.java:723) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.ManagedStoragePlugin.replacePlugin(ManagedStoragePlugin.java:836) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.ManagedStoragePlugin.createOrUpdateSource(ManagedStoragePlugin.java:327) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.ManagedStoragePlugin.createSource(ManagedStoragePlugin.java:293) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.PluginsManager.create(PluginsManager.java:152) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.CatalogServiceImpl.createSource(CatalogServiceImpl.java:332) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.CatalogServiceImpl.access$400(CatalogServiceImpl.java:93) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.CatalogServiceImpl$SourceModifier.createSource(CatalogServiceImpl.java:567) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.CatalogImpl.createSource(CatalogImpl.java:605) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.SourceAccessChecker.createSource(SourceAccessChecker.java:245) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.exec.catalog.DelegatingCatalog.createSource(DelegatingCatalog.java:206) [dremio-sabot-kernel-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:160) [dremio-dac-backend-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:151) [dremio-dac-backend-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.dac.service.source.SourceService.registerSourceWithRuntime(SourceService.java:147) [dremio-dac-backend-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at com.dremio.dac.resource.PutSourceResource.putSource(PutSourceResource.java:80) [dremio-dac-backend-4.1.4-202001240912140359-a90eb503.jar:4.1.4-202001240912140359-a90eb503]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]

You should be able to remove the entire Database reference. In https://github.com/dremio-hub/dremio-sqllite-connector/blob/master/src/main/java/com/dremio/exec/store/jdbc/conf/SqliteConf.java,

  1. remove lines 45-48
  2. change line 50 to @tag(1)
  3. remove line 57-
  4. change line 59 to return String.format(“jdbc:sqlite:%s”);

If that does not work, can you post your Conf.java?

hi @b-rock,

I encountered the same issue. I added a UT case, it could connect. But if I put the jar to server, it report this error. Do you have any idea where to check?