错误:hbase Caused by: java.net.ConnectException: Connection refused: no further informa
我的/etc/hosts文件内容为:
192.168.1.200 master
192.168.1.201 node1
192.168.1.202 node2
但是我的centos集群配置的双IP
另一个组网络是:
192.168.31.160
192.168.31.162
192.168.31.161
win7中的C:\Windows\System32\drivers\etc\HOSTS文件配置的是
...
192.168.31.160 master
192.168.31.162 node1
192.168.31.161 node2
API
Configuration conf = new Configuration();
conf.set("hbase.zookeeper.quorum","master,node1,node2"); //hbase-site.xml
conf.set("hbase.zookeeper.property.clientPort", "2181");
HBaseHelper hbase = new HBaseHelper(conf);
win7中的映射跟centos中的/etc/hosts配置不一样,导致不能解析
win7 hosts改为如下配置ok
...
192.168.1.200 master
192.168.1.201 node1
192.168.1.202 node2