DFSClient端SocketTimeoutException异常的处理

Failed to connect to /182.x.x.x:50010, add to deadNodes and continue

java.net.SocketTimeoutException: 60000 millis timeout while waiting for channel to be ready for read. ch : java.nio.channels.SocketChannel[connected local=/182.x.x.x:37375 remote=/182.x.x.x:50010]

出现这个问题是因为datanode rpc连接都被占用,导致客户端请求超过等待时间所致。两方面处理这个问题:

1. 增加datanode RPC连接数,默认值为3,我们设置为5。我们集群30台服务器,300台客户端。建议该值在3-8之间,太多会影响datanode的内存和CPU

2. 客户端conf设置属性“dfs.socket.timeout”,我这里值为"180000"

参考文章:


--end

猜你喜欢

转载自heipark.iteye.com/blog/1485323
今日推荐