2017-03-31 12 views
1

私はちょうど2のノードとのZooKeeperのクラスタが、各zoo.confは以下ZooKeeperノードカウンタ?

# Servers 
server.1=10.138.0.8:2888:3888 
server.2=10.138.0.9:2888:3888 

同じ2本のラインがの両方コンフィグ存在有し

[[email protected] supervisor.d]# echo mntr | nc 10.138.0.8 2181 
zk_version  3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT 
zk_avg_latency 0 
zk_max_latency 0 
zk_min_latency 0 
zk_packets_received  5 
zk_packets_sent 4 
zk_num_alive_connections  1 
zk_outstanding_requests 0 
zk_server_state follower 
zk_znode_count 4 
zk_watch_count 0 
zk_ephemerals_count  0 
zk_approximate_data_size  27 
zk_open_file_descriptor_count 28 
zk_max_file_descriptor_count 4096 

[[email protected] supervisor.d]# echo mntr | nc 10.138.0.9 2181 
zk_version  3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT 
zk_avg_latency 0 
zk_max_latency 0 
zk_min_latency 0 
zk_packets_received  3 
zk_packets_sent 2 
zk_num_alive_connections  1 
zk_outstanding_requests 0 
zk_server_state leader 
zk_znode_count 4 
zk_watch_count 0 
zk_ephemerals_count  0 
zk_approximate_data_size  27 
zk_open_file_descriptor_count 29 
zk_max_file_descriptor_count 4096 
zk_followers 1 
zk_synced_followers  1 
zk_pending_syncs  0 

なぜzk_znode_count == 4?

答えて

2

ZnodesはZookeeperサーバーではありません。

HadoopのDefinitive Guideのから:

飼育係は、ファイルやディレクトリが、 ノードの統一概念がありません、データのコンテナとしても機能するのznodeを、(と呼ばれます ファイルのような)と他のzノードのコンテナ(ディレクトリのような)。

zk_znode_countは、そのZookeeperサーバーで利用可能なzノードの数を示します。 ZKアンサンブルでは、各サーバーに4つのzノードがあります。

関連する問題