Connecting an external Accumulo instance and java

僤鯓⒐⒋嵵緔 提交于 2019-12-03 20:28:50

To correctly specify the list of Apache ZooKeeper nodes when connecting to Apache Accumulo with the ZooKeeperInstance, the zooServers should be specified as:

  1. A comma-separated list of host:port that ZooKeeper is already set up and running on, without spaces.
  2. Ensure you are using the client port for ZooKeeper, and not the TServer. (Port 2181 is the default client port for ZooKeeper. Port 9997 is the default client port for TServers.)
  3. If you're running ZooKeeper on the default port (2181), you may omit the :port portion, leaving only a comma-separated list of hosts, or you can combine them if you have some on the non-standard port and some on the standard port, as in "proxyhost,proxyhost:2182,thirdhost:2181".
  4. It shouldn't matter whether you use the IP address or the hostname, so long as whatever you specify can be reached from the client, and the port is open and not blocked by a firewall.

See the JavaDoc comment on the constructor here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!