部分查询结果归因于Elasticsearch集群运行状况为黄色 [英] Partial query results due to Elasticsearch cluster health yellow

查看:77
本文介绍了部分查询结果归因于Elasticsearch集群运行状况为黄色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Elasticsearch集群运行状况为黄色.

My elasticsearch cluster health status is Yellow.

这是否意味着我可能会得到部分结果?

Does it mean that I may get partial results?

我正在使用亚马逊弹性实例,群集运行状况"选项卡上的摘要看起来像这样...

I am using amazon elastic instance and the summary on cluster health tab looks like this...

Number of nodes
1

Number of data nodes
1

Active primary shards
206

Active shards
206

Unassigned shards
205

我想知道如何将状态从黄色更改为绿色

I will like to know how do I change the status from Yellow to Green

推荐答案

集群运行状况黄色表示未分配一个或多个副本分片,elasticsearch查询要么进入主数据库或副本碎片以获取搜索结果.

Cluster health yellow means one or more replicas shards are not allocated and elasticsearch query goes either to primary or replica shards to get the search results.

有关各种健康状况的详细信息,请参见 ES文档.

More info on various health status as per this ES doc.

集群运行状况为:绿色,黄色或红色.在碎片上级别,红色状态指示未分配特定的分片在群集中,黄色表示已分配主分片,但副本不是,绿色表示已分配所有分片.

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必须查询所有主要分片,并且您不会获得部分结果,但搜索结果的性能会受到影响,因为副本分片用于提高搜索性能和高可用性

As in this case, for some indices their replicas are not assigned to any data nodes, Elasticsearch has to query all the primary shards and you will not get the partial results, but the performance of your search results would suffer, as replicas shards are used to improve the search performance and high availability

有关副本如何改善搜索延迟的更多信息,请参见.

More information on how replicas improve search latency can be found in tune search performance article of ebay section.

Q:-关于您如何将状态从黄色更改为绿色的第二个问题.

答案:您需要找出原因,为什么不分配有问题的索引副本,是因为没有数据节点,因为Elasticsearch不在分配主碎片的同一节点上分配副本,还是没有数据节点?与数据节点相比,这些索引的副本更多.在这种情况下,您可以增加数据节点或减少副本节点的数量(可以动态完成.

Answer: You need to figure out the reason, why your problematic indices replicas are not assigned, is it because there are less no of data nodes as Elasticsearch doesn't allocate replicas on the same node where its primary shard is allocated or you have more replicas for these indices than the data nodes. In these cases, you can increase the data nodes or reduce the no of replicas nodes(which can be done dynamically.

这篇关于部分查询结果归因于Elasticsearch集群运行状况为黄色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆