解決客戶端通過zookeeper連接到hbase時連接過多的問題


原因:客戶端程序通過zookeeper訪問hbase的連接數超過設置的默認鏈接數(默認數是30),連接數不夠用會導致后續的連接連接不上去。

解決辦法:設置hbase-site.xml配置文件,添加如下屬性

<property>
    <name>hbase.zookeeper.property.maxClientCnxns</name>
    <value>300</value>
    <description>Property from ZooKeeper's config zoo.cfg.
    Limit on number of concurrent connections (at the socket level) that a
    single client, identified by IP address, may make to a single member of
    the ZooKeeper ensemble. Set high to avoid zk connection issues running
    standalone and pseudo-distributed.
    </description>
  </property>

將最大連接數我這設置成了300,后來發現仍然提示同樣的問題,最大連接數並沒有起作用,根據屬性提示,直接修改zoo.cfg配置文件

添加:maxClientCnxns=300

重啟下zookeeper,hbase,重新測試,問題解決。

 

文章轉自:http://blog.csdn.net/chlaws/article/details/7101020


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM