allocation
GET /_cluster/allocation/explain
返回集群中分片分配的解释。如分片为什么未分配,为什么分配到当前节点而不是其他节点。
查询参数
| 参数 | 说明 |
| include_disk_info | 如果为true,则会返回磁盘使用和分片情况,默认为false。 |
| include_yes_decisions | 如果为true,则返回决策为YES的解释说明,默认为false。 |
请求体
| 参数 | 说明 |
| index | 指定需要解释的索引名称,需要与shard、primary联合使用。 |
| shard | 指定要解释的分片id,需要与index、primary联合使用。 |
| primary | 如果为true,则返回指定分片的主分片解释,需要与index、shard联合使用。 |
| current_node | 指定节点id或节点名称,则只返回位于指定节点上的分片的解释,需要与index、shard、primary联合使用。 |
返回信息
| 字段 | 说明 |
| index | 索引名称。 |
| shard | 分片id。 |
| primary | 是否主分片。 |
| current_state | 分片当前状态。 |
| unassigned_info |
分片最初未分配原因,包括具体原因、时间、以及最近分配状态。 |
| cluster_info | include_disk_info为true时返回,包括节点信息、分片大小、分片路径。 |
| can_allocate | 是否可分配分片。 |
| allocate_explanation | 分配说明。 |
| node_allocation_decisions |
节点分配决策,包括节点id、名称、通信地址、节点属性、节点决策、决策器信息(决策器名称、决策、说明)。 |
| can_remain_on_current_node | 是否允许分片保留在当前节点上。 |
| can_remain_decisions | 分片保留决策信息(决策器名称、决策、说明)。 |
| can_move_to_other_node | 是否允许移动到其他节点上。 |
| move_explanation | 移动说明。 |
| can_rebalance_cluster | 是否允许再平衡。 |
| can_rebalance_cluster_decisions | 再平衡决策信息(决策器名称、决策、说明)。 |
| can_rebalance_to_other_node | 是否允许再平衡到其他节点。 |
| rebalance_explanation | 再平衡说明。 |

1270

被折叠的 条评论
为什么被折叠?



