2016-04-25 106 views
1

我有一个Elasticsearch群集中的3个节点。每个节点都可以成为主节点和数据节点。我Elasticsearch设置为:ElasticSearch群集复制

index.number_of_shards: 8 
index.number_of_replicas: 2 
gateway.recover_after_nodes: 2 
gateway.recover_after_time: 5m 
gateway.expected_nodes: 3 
discovery.zen.minimum_master_nodes: 2 
discovery.zen.ping.multicast.enabled: false 
discovery.zen.ping.unicast.hosts: ["host1", "host2:9200","host3:9200"] 

My Cluster is up now and cluster health is green. But Shard allocation is like 

Node1 - 0,1,2,3,4,6 where 6 is primary and other are replicas 

Node2 - 5,6,7 all replicas 

Node3 - 0,1,2,3,4,5,7 all primary 

这种结构显示仅1中的节点每个碎片分裂的副本复印件。但我在设置中提到了2个副本,那么它应该显示每个分片的2个副本。

我是否理解错误或设置中缺少某些内容。

+0

你能用'curl host1:9200/_cat/shards'获得的输出更新你的问题吗? – Val

+0

它表示没有为uri [/ _cat/shards]和方法[GET]找到处理程序。请让我知道你需要什么信息 – coder

+0

你有哪个版本的ES? – Val

回答

1

index.number_of_replicaselasticsearch.yml是用于新索引。你已经有人需要手动调整:PUT /_all/_settings { "index": { "number_of_replicas": 2 } }

另外,请考虑升级。 ES现在在版本2.3.1,0.90是非常古老的。