Nitul created DRILL-8427: ---------------------------- Summary: Apache drill connectivity with zookeeper on Kubernetes cluster with JDBC data source with Kubernetes or docker Key: DRILL-8427 URL: https://issues.apache.org/jira/browse/DRILL-8427 Project: Apache Drill Issue Type: Bug Components: Client - JDBC Affects Versions: 1.17.0 Reporter: Nitul
Setup: Java application can use specified JDBC driver to connect to drill via zookeeper. https://drill.apache.org/docs/using-the-jdbc-driver/ E.g. jdbc:drill:zk=10.10.100.56:2181/drill/drillbits1;schema=hive Using this zookeeper provides a host name of the drill which is available and ready to serve the query. Java app will connect to this drill host and gets the connection to execute the query. In case of Kubernetes drill pod is running and registered to zookeeper with some dynamic pod name. Something like apachedrill-cb97cfc7c-mfkhr. Now, zookeeper provides apache drill's hostname as above and java app is trying to connect to this pod, but this pod host name is resolved and it failed. {code:java} java.sql.SQLNonTransientConnectionException: Failure in connecting to Drill: oadd.org.apache.drill.exec.rpc.RpcException: CONNECTION : java.net.UnknownHostException: apachedrill-cb97cfc7c-mfkhr \tat org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:164) \tat org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:67) \tat org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:67) \tat oadd.org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138) \tat org.apache.drill.jdbc.Driver.connect(Driver.java:75) \tat com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) \tat com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) \tat com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) \tat com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) \tat com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) \tat com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) \tat com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) {code} The solution can be exposing the apache drill pod host name to kubernetes cluster. But is there anything we are missing or improvement needed, as a part of zookeeper and apache drill configuration setup. -- This message was sent by Atlassian Jira (v8.20.10#820010)