• 解决Elasticsearch集群状态黄色,unassigned INDEX_CREATED


    #查看集群状态
    curl -XGET "http://ip:port/_cluster/health?pretty" { "cluster_name" : "log4x-cluster02", "status" : "yellow", "timed_out" : false, "number_of_nodes" : 26, "number_of_data_nodes" : 13, "active_primary_shards" : 1747, "active_shards" : 5163, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 26, #未分配的分片数 "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 99.49894006552323 } #查看UNASSIGNED状态的索引 curl -XGET "http://ip:port/_cat/shards?h=index,shard,prirep,state,unassigned.reason"|grep UNASSIGNED #查看索引的分片数number_of_replicas curl -XGET "ip:port/索引名/_settings" #重新分配副本 curl -XPUT -H "Content-Type:application/json" "ip:port/索引名/_settings" -d '{"number_of_replicas": 0}' curl -XPUT -H "Content-Type:application/json" "ip:port/索引名/_settings" -d '{"number_of_replicas": 2}'
    #查看重新分配分片的信息(初始化)
    curl -XGET "http://ip:port/_cat/shards?v"|grep INITIALIZING
    curl
    -XGET "http://ip:port/_cluster/health?pretty" { "cluster_name" : "log4x-cluster02", "status" : "yellow", "timed_out" : false, "number_of_nodes" : 26, "number_of_data_nodes" : 13, "active_primary_shards" : 1747, "active_shards" : 5163, "relocating_shards" : 0, "initializing_shards" : 26, #重新分配初始化的分片数,这个数变成0,集群green "unassigned_shards" : 0, #未分配的分片数 "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 99.49894006552323 }
    你好
  • 相关阅读:
    Hadoop 源码编译
    Hadoop之HDFS介绍
    CentOS 7 导入epel库
    CentOS7安装 VirtualBox虚拟机
    ios开发在导入环信SDK后运行出现 Reason: image not found 的解决方案
    centos安装PHP
    centOS安装apache服务器
    centOS最小化安装后网络连接问题
    django orm
    yield, async
  • 原文地址:https://www.cnblogs.com/cuibaiyi/p/13555497.html
Copyright © 2020-2023  润新知