Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-8427

Apache drill connectivity with zookeeper on Kubernetes cluster with JDBC data source with Kubernetes or docker

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Information Provided
    • 1.17.0
    • None
    • Client - JDBC
    • None

    Description

      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.

      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)
      

      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.

      Attachments

        Activity

          People

            dzamo James Turton
            Nitul Nitul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: