解決客戶端通過zookeeper連線到hbase時連線過多的問題
阿新 • • 發佈:2018-12-11
2015年04月24日 16:54:57 a_lele123 閱讀數:2434
原因:客戶端程式通過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,重新測試,問題解決。