spark报错:Java.net.socketTimeOutException:read time out(已解决)
现象
Saprk-sql和ThriftServer使用时报错:Java.net.socketTimeOutException:read time out
产生原因
是由于hivemetastore过于繁忙或者gc导致连接超时
解决方案
spark-sql解决:hive.metastore.client.socket.timeout将该参数调大。ThriftServer解决办法:在获得一个Connection之前加上:DriverManager.setLoginTimeout(100)