java使用hive-jdbc查询超时:java.sql.SQLException: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
java.sql.SQLException: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:262)
at org.apache.hive.jdbc.HivePreparedStatement.execute(HivePreparedStatement.java:98) at
如果超时时间是三十秒的话 那就是驱动的请求时间没设置 ,这个时间默认就是30s
在执行sql前执行
// 设置连接超时时间为6000秒 DriverManager.setLoginTimeout(6000);
增加请求的超时时间
-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------
(蓝奏云官网如果有地址失效了,可以私信我,后续看到会补充)

浙公网安备 33010602011771号