[英]ElasticSearch Cluster Replication
I have an Elasticsearch
cluster of 3 nodes.我有一个由 3 个节点组成的
Elasticsearch
集群。 Each node can become a master and data node.每个节点都可以成为主节点和数据节点。 My
Elasticsearch
settings are:我的
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
This structure shows only 1 replica copy of each shard split on nodes.此结构仅显示节点上每个分片拆分的 1 个副本。 But I mentioned 2 replicas in settings then it should show 2 replica copy of each shard.
但是我在设置中提到了 2 个副本,然后它应该显示每个分片的 2 个副本。
Am I understanding it wrong or something is missing in settings.我理解错了还是设置中缺少某些内容。
index.number_of_replicas
from elasticsearch.yml
is for new indices. index.number_of_replicas
从elasticsearch.yml
是新指数。 The ones you already have need to be adjusted manually: PUT /_all/_settings { "index": { "number_of_replicas": 2 } }
您已经拥有的需要手动调整:
PUT /_all/_settings { "index": { "number_of_replicas": 2 } }
Also, do please consider upgrading.另外,请考虑升级。 ES is now at version 2.3.1, 0.90 is very old.
ES 现在是 2.3.1 版本,0.90 已经很老了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.