与container同级别
与container同级别2

Bash/Shell语法速览与技巧

Shell基础语法 循环 while循环 while死循环 1 2 3 4 5 while true do echo "whle loop" sleep 10 done for循环 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # 范围循环 for

Elasticsearch常用API

索引API 查看索引分布情况 curl http://es:9200/_cat/shards?pretty 查看所有索引 curl -XGET http://es:9200/_cat/indices?pretty 删除指定索引 curl -XDELETE http://es:9200/IndexName 索引配置信息 curl -XGET http://es:9200/IndexName/_settings?pretty 取消所有索引只读模式 curl -XPUT -H "Content-type: application/json" http://es:9200/_settings -d '{ "index.blocks.read_only_allow_delete":"false" }' 索引重命名 curl -XPOST -H

Elasticsearch正确重启维护

加大延迟索引复制时间 1 2 3 4 5 curl -XPUT -H "Content-type: application/json" http://es:9200/_all/_settings -d '{ "settings": { "index.unassigned.node_left.delayed_timeout": "5m" } }' 通过API,临时禁用索引分片 1 2 3 4 5 curl -XPUT -H "Content-type: application/json" http://es:9200/_cluster/settings -d '{ "transient" : { "cluster.routing.allocation.enable" : "none" } }' 停止Elas