由于 Elasticsearch 集群健康黄色导致的部分查询结果
Partial query results due to Elasticsearch cluster health yellow
我的 elasticsearch 集群健康状态是黄色。
这是否意味着我可能会得到部分结果?
我正在使用亚马逊弹性实例,集群运行状况选项卡上的摘要如下所示...
Number of nodes
1
Number of data nodes
1
Active primary shards
206
Active shards
206
Unassigned shards
205
我想知道如何将状态从 黄色更改为绿色
集群运行状况黄色 表示一个或多个副本分片 未分配,elasticsearch 查询转到主分片或副本分片以获取搜索结果。
根据 this ES 文档获得有关各种健康状况的更多信息。
The cluster health status is: green, yellow or red. On the shard
level, a red status indicates that the specific shard is not allocated
in the cluster, yellow means that the primary shard is allocated but
replicas are not, and green means that all shards are allocated.
在这种情况下,对于某些索引,它们的副本未分配给任何数据节点,Elasticsearch 必须查询所有主分片,你不会得到部分结果,但你的性能搜索结果会受到影响,因为副本分片用于提高搜索性能和高可用性
有关副本如何改善搜索延迟的更多信息,请参阅 tune search performance article of ebay 部分。
问:- 关于您的第二个问题,关于如何将状态从黄色更改为绿色。
回答:你需要找出原因,为什么你的问题索引副本没有被分配,是不是因为 Elasticsearch 没有在它的主分片所在的同一个节点上分配副本,所以没有数据节点分配的,或者您拥有比数据节点更多的这些索引的副本。
在这些情况下,您可以增加数据节点或减少副本节点数(可以动态完成。
如果您想保留副本分片,请尝试增加节点。您的副本分片仍未分配,因此您获得 [黄色] 集群状态。
您也可以减少副本分片的数量,但这会影响搜索性能。
我的 elasticsearch 集群健康状态是黄色。
这是否意味着我可能会得到部分结果?
我正在使用亚马逊弹性实例,集群运行状况选项卡上的摘要如下所示...
Number of nodes
1
Number of data nodes
1
Active primary shards
206
Active shards
206
Unassigned shards
205
我想知道如何将状态从 黄色更改为绿色
集群运行状况黄色 表示一个或多个副本分片 未分配,elasticsearch 查询转到主分片或副本分片以获取搜索结果。
根据 this ES 文档获得有关各种健康状况的更多信息。
The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated.
在这种情况下,对于某些索引,它们的副本未分配给任何数据节点,Elasticsearch 必须查询所有主分片,你不会得到部分结果,但你的性能搜索结果会受到影响,因为副本分片用于提高搜索性能和高可用性
有关副本如何改善搜索延迟的更多信息,请参阅 tune search performance article of ebay 部分。
问:- 关于您的第二个问题,关于如何将状态从黄色更改为绿色。
回答:你需要找出原因,为什么你的问题索引副本没有被分配,是不是因为 Elasticsearch 没有在它的主分片所在的同一个节点上分配副本,所以没有数据节点分配的,或者您拥有比数据节点更多的这些索引的副本。 在这些情况下,您可以增加数据节点或减少副本节点数(可以动态完成。
如果您想保留副本分片,请尝试增加节点。您的副本分片仍未分配,因此您获得 [黄色] 集群状态。
您也可以减少副本分片的数量,但这会影响搜索性能。