我正在使用Drill 1.13。
当我使用开始钻取实例时
sqlline.bat -u“ jdbc:drill:zk = local”,我可以进入控制台并查询数据库。但是,当我尝试通过应用程序访问钻取数据库时:使用jdbc驱动程序org.apache.drill.jdbc.Driver
-和连接字符串
"jdbc:drill:zk=local"
。
我收到一个错误:
Caused by: java.sql.SQLException: Failure in connecting to Drill: oadd.org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client.
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:166) [drill-jdbc-all-1.10.0.jar:1.10.0]
at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72) [drill-jdbc-all-1.10.0.jar:1.10.0]
at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69) [drill-jdbc-all-1.10.0.jar:1.10.0]
at oadd.org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143) [drill-jdbc-all-1.10.0.jar:1.10.0]
at org.apache.drill.jdbc.Driver.connect(Driver.java:72) [drill-jdbc-all-1.10.0.jar:1.10.0]
at java.sql.DriverManager.getConnection(DriverManager.java:664) [rt.jar:1.8.0_131]
at java.sql.DriverManager.getConnection(DriverManager.java:247) [rt.jar:1.8.0_131]
at org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:179) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:157) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:1018) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.datasources.SharedPoolDataSource.registerPool(SharedPoolDataSource.java:167) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:127) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:884) [commons-dbcp2.jar:2.2.0]
at org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:858) [commons-dbcp2.jar:2.2.0]
at com.vermilionsoftware.vrs.common.util.DBPoolManager.getConnectionWithoutThreadTimeout(DBPoolManager.java:254) [vrsEJBClient.jar:]
... 156 more
Caused by: oadd.org.apache.drill.exec.rpc.RpcException: Failure setting up ZK for client.
at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:329) [drill-jdbc-all-1.10.0.jar:1.10.0]
at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:157) [drill-jdbc-all-1.10.0.jar:1.10.0]
... 170 more
Caused by: 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) [drill-jdbc-all-1.10.0.jar:1.10.0]
at oadd.org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:327) [drill-jdbc-all-1.10.0.jar:1.10.0]
... 171 more
任何想法都在这里,为什么它会从sqlline成功连接,而不是jdbc连接?
答案 0 :(得分:1)
您是否要使用此应用程序以分布式模式连接Drillbit?能否请您分享一些安装细节? zk = local 字符串将使用sqlline以嵌入式模式运行Drill。 您也可以参考this link来了解如何使用JDBC接口进行连接。