描述
分片的分配可以发生在如下的阶段:结点初始化恢复,复制分片,重新平衡,节点添加和删除
配置
cluster.routing.allocation.enable:
描述: 启用分片分配的设置
all (default 所有分片 )
primaries (主分片)
new_primaries (新索引的主分片)
none (所有的都不分配)
该配置不影响主分片分配,当重启一个节点的时候
cluster.routing.allocation.node_concurrent_recoveries
描述:一个节点上并发恢复的分片数,默认配置为2
cluster.routing.allocation.node_initial_primaries_recoveries
描述:同一个节点上主分片的并发恢复数,默认配置为4
indices.recovery.concurrent_streams
描述: The number of network streams to open per node to recover a shard from a peer shard. Defaults to 3.
indices.recovery.concurrent_small_file_streams
The number of streams to open per node for small files (under 5mb) to recover a shard from a peer shard. Defaults to 2.