我试图建立一个在Kudu上运行Impala的单节点群集,而HiveMetaStore由PostgreSQL管理。尝试通过com.cloudera.impala.jdbc41.Driver从Hive元存储读取数据时,连接数据库失败,并显示“ java.net.SocketTimeoutException:读取超时”。
我尝试仅使用PostgreSQL驱动程序对安装进行故障排除,该驱动程序可以正确连接到数据库并运行预期的工作负载而不会出现问题。同样,可以查询Kudu上的表,而不会因impala-shell出现问题。
安装基于带有hive-2.1.1的CDH6.x快照,完整的堆栈跟踪可在下面找到。
让我知道是否还有其他有趣的配置选项。
java.lang.RuntimeException: Failed to connect to database
at pt.haslab.htapbench.api.Worker.<init>(Worker.java:89)
at pt.haslab.htapbench.benchmark.TPCCWorker.<init>(TPCCWorker.java:72)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.createTerminals(HTAPBenchmark.java:189)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.makeWorkersImpl(HTAPBenchmark.java:88)
at pt.haslab.htapbench.api.BenchmarkModule.makeWorkers(BenchmarkModule.java:209)
at pt.haslab.htapbench.core.HTAPBench.runHybridWorkload(HTAPBench.java:846)
at pt.haslab.htapbench.core.HTAPBench.main(HTAPBench.java:666)
Caused by: java.sql.SQLException: [Cloudera][ImpalaJDBCDriver](500151) Error setting/closing session: java.net.SocketTimeoutException: Read timed out.
at com.cloudera.impala.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.impala.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.impala.hivecommon.core.HiveJDBCCommonConnection.establishConnection(Unknown Source)
at com.cloudera.impala.impala.core.ImpalaJDBCConnection.establishConnection(Unknown Source)
at com.cloudera.impala.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)
at com.cloudera.impala.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.impala.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at pt.haslab.htapbench.api.BenchmarkModule.makeConnection(BenchmarkModule.java:106)
at pt.haslab.htapbench.api.Worker.<init>(Worker.java:85)
at pt.haslab.htapbench.benchmark.TPCCWorker.<init>(TPCCWorker.java:72)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.createTerminals(HTAPBenchmark.java:189)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.makeWorkersImpl(HTAPBenchmark.java:88)
at pt.haslab.htapbench.api.BenchmarkModule.makeWorkers(BenchmarkModule.java:209)
at pt.haslab.htapbench.core.HTAPBench.runHybridWorkload(HTAPBench.java:846)
Caused by: com.cloudera.impala.support.exceptions.GeneralException: [Cloudera][ImpalaJDBCDriver](500151) Error setting/closing session: java.net.SocketTimeoutException: Read timed out.
... 17 more
Caused by: com.cloudera.impala.jdbc41.internal.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
at com.cloudera.impala.jdbc41.internal.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
at com.cloudera.impala.jdbc41.internal.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at com.cloudera.impala.jdbc41.internal.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at com.cloudera.impala.jdbc41.internal.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at com.cloudera.impala.jdbc41.internal.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at com.cloudera.impala.jdbc41.internal.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at com.cloudera.impala.jdbc41.internal.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160)
at com.cloudera.impala.hivecommon.api.HS2ClientWrapper.recv_OpenSession(Unknown Source)
at com.cloudera.impala.jdbc41.internal.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)
at com.cloudera.impala.hivecommon.api.HS2ClientWrapper.OpenSession(Unknown Source)
at com.cloudera.impala.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.impala.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.impala.hivecommon.core.HiveJDBCCommonConnection.establishConnection(Unknown Source)
at com.cloudera.impala.impala.core.ImpalaJDBCConnection.establishConnection(Unknown Source)
at com.cloudera.impala.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)
at com.cloudera.impala.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.impala.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at pt.haslab.htapbench.api.BenchmarkModule.makeConnection(BenchmarkModule.java:106)
at pt.haslab.htapbench.api.Worker.<init>(Worker.java:85)
at pt.haslab.htapbench.benchmark.TPCCWorker.<init>(TPCCWorker.java:72)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.createTerminals(HTAPBenchmark.java:189)
at pt.haslab.htapbench.benchmark.HTAPBenchmark.makeWorkersImpl(HTAPBenchmark.java:88)
at pt.haslab.htapbench.api.BenchmarkModule.makeWorkers(BenchmarkModule.java:209)
at pt.haslab.htapbench.core.HTAPBench.runHybridWorkload(HTAPBench.java:846)
at pt.haslab.htapbench.core.HTAPBench.main(HTAPBench.java:666)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at com.cloudera.impala.jdbc41.internal.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
... 27 more