kudu 报错org.apache.kudu.client.NoLeaderFoundException
场景:
Java API 连接kudu表
报错信息:
Caused by: org.apache.kudu.client.NoLeaderFoundException: Master config (192.168.1.117:7051) has no leader.
Exceptions received: org.apache.kudu.client.RecoverableException:
[peer master-192.168.1.117:7051(192.168.100.190:7051)] encountered a read timeout; closing the channel\
Master config (192.168.100.190:7051) has no leader : 客户端找不到master的leader
encountered a read timeout : 遭遇读取超时
因为kudu客户端连接kudu服务器时,服务器返回master的主机名
解决办法:
java使用主机名连接kudu
String masterAddresses = "node01.hadoop.com:7051";