zoukankan      html  css  js  c++  java
  • 解决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 }
    你好
  • 相关阅读:
    2013-3 阿里性能稳定性沙龙
    8种Nosql数据库系统对比
    百度技术笔记之2013-1
    百度技术沙龙之2013-2&3
    【消息队列MQ】各类MQ比较
    Unity3D 游戏引擎之C#使用Socket与HTTP连接server数据传输包
    android的ndk学习(1)
    杭电 3555 Bomb
    FaceBook开源库Fresco
    SDUTOJ 2476Period
  • 原文地址:https://www.cnblogs.com/cuibaiyi/p/13555497.html
Copyright © 2011-2022 走看看