【问题标题】:Apache Drill JDBC not working with all default on Windowns 10Apache Drill JDBC 不适用于 Windows 10 上的所有默认设置
【发布时间】:2017-11-21 22:54:27
【问题描述】:

我无法使 JDBC 连接正常工作。非常感谢您的帮助。

  1. 在 Windows 10 Pro 上安装了 Drill,ODBC 驱动程序,在 本地节点(如 https://drill.apache.org/docs/drill-in-10-minutes/)
  2. 可以使用 ODBC 从 Drill Explorer 进行连接和查询。

钻壳:

JDBC:

别名:

但是当我尝试从 SQuirreL 连接时,如 (https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/),它无法正常工作。 我正在使用 /jars/jdbc-driver/drill-jdbc-all-.jar 进行 JDBC 连接。

java.io.IOException: Failure to connect to the zookeeper cluster service within the allotted time of 10000 milliseconds.
at oadd.org.apache.drill.exec.coord.zk.ZKClusterCoordinator.start(ZKClusterCoordinator.java:123)
at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:327)
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:158)
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
at oadd.org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

【问题讨论】:

    标签: java jdbc apache-drill


    【解决方案1】:

    我认为您不能使用 ZooKeeper“本地”,因为您来自通过 JDBC 的“外部”源。尝试将其更改为“localhost”或您的主机名。

    【讨论】:

    • 感谢 tobi6 的建议。我尝试了可能的组合,例如使用 、localhost。似乎没有工作。
    【解决方案2】:

    最后,这篇文章解决了我的问题。 Apache Drill - connection to Drill in Embedded Mode [java]

    在drill运行时使用jdbc:drill:drillbit=192.xxx.xxx.xxx,可以连接成功..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-05
      • 2018-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-15
      • 1970-01-01
      相关资源
      最近更新 更多