当Java API远程连接出错:Can't get the locations原先填入的是IP地址,后来改为HOSTS文件中配置的主机名问题解决,如下红色字体部分: conf.set("hbase.zookeeper.quorum", "hostname"); conf.set("hbase.zookeeper.property.clientPort", "2181");