|
@@ -1,16 +1,15 @@
|
|
|
// 新增某字段mapping
|
|
|
-curl -XPUT http://127.0.0.1:19805/projectset/_mapping -u es_all:TopJkO2E_d1x -H 'Content-Type: application/json' -d '
|
|
|
+curl -XPUT http://127.0.0.1:19805/forecast_v1/_mapping -u jianyuGr:we3g8glKfe# -H 'Content-Type: application/json' -d '
|
|
|
{
|
|
|
"properties": {
|
|
|
- "bidendtime": {
|
|
|
- "type": "long"
|
|
|
+ "budget": {
|
|
|
+ "type": "double"
|
|
|
},
|
|
|
- "list": {
|
|
|
- "properties": {
|
|
|
- "bidendtime": {
|
|
|
- "type": "long"
|
|
|
- }
|
|
|
- }
|
|
|
+ "bidamount": {
|
|
|
+ "type": "double"
|
|
|
+ },
|
|
|
+ "sortprice": {
|
|
|
+ "type": "double"
|
|
|
}
|
|
|
}
|
|
|
}'
|
|
@@ -78,6 +77,9 @@ curl -XPUT "http://127.0.0.1:19805/projectset/_mapping?pretty" -u es_all:TopJkO2
|
|
|
}
|
|
|
}'
|
|
|
|
|
|
+// 清库
|
|
|
+curl -XPOST 'http://127.0.0.1:19905/ttbid_v9/_delete_by_query' -u jybid:Top2023_JEB01i@31 -H 'Content-Type:application/json' -d '{"query": { "match_all": {} }}'
|
|
|
+
|
|
|
// 默认查询数量
|
|
|
curl -XPUT "http://127.0.0.1:19805/bidding/_settings" -u es_all:TopJkO2E_d1x -H 'Content-Type: application/json' -d '
|
|
|
{
|
|
@@ -85,20 +87,20 @@ curl -XPUT "http://127.0.0.1:19805/bidding/_settings" -u es_all:TopJkO2E_d1x -H
|
|
|
}'
|
|
|
|
|
|
//开启节点平衡
|
|
|
-curl -XPUT http://127.0.0.1:19805/bidding/_settings -u es_all:TopJkO2E_d1x -H 'content-Type:application/json' -d'{
|
|
|
+curl -XPUT http://127.0.0.1:19805/_cluster/settings -u ianyu:KHiwdi490Sss# -H 'content-Type:application/json' -d'{
|
|
|
"transient" : {
|
|
|
- "cluster.routing.allocation.enable" : "all"
|
|
|
+ "cluster.routing.allocation.enable" : "none"
|
|
|
}
|
|
|
}'
|
|
|
|
|
|
//关闭节点平衡
|
|
|
-curl -XPUT http://127.0.0.1:19805/_cluster/settings --user es_all:TopJkO2E_d1x -H 'content-Type:application/json' -d'{
|
|
|
+curl -XPUT http://127.0.0.1:19905/_cluster/settings -u jybid:Top2023_JEB01i@31 -H 'content-Type:application/json' -d'{
|
|
|
"transient" : {
|
|
|
- "cluster.routing.allocation.enable" : "none"
|
|
|
+ "cluster.routing.allocation.enable" : "all"
|
|
|
}
|
|
|
}'
|
|
|
//开启节点平衡
|
|
|
-curl -XPUT http://127.0.0.1:19805/_cluster/settings --user es_all:TopJkO2E_d1x -H 'content-Type:application/json' -d'{
|
|
|
+curl -XPUT http://192.168.3.241:9205/_cluster/settings -H 'content-Type:application/json' -d'{
|
|
|
"transient" : {
|
|
|
"cluster.routing.allocation.enable" : "all"
|
|
|
}
|
|
@@ -113,7 +115,7 @@ curl -XPUT http://192.168.3.206:9800/_cluster/settings -d'{
|
|
|
//开启节点平衡,es7 环境,需要传递header参数
|
|
|
curl -H 'Content-Type: application/json' -XPUT http://192.168.3.149:9200/_cluster/settings -d'{
|
|
|
"transient" : {
|
|
|
- "cluster.routing.allocation.enable" : "all"
|
|
|
+ "cluster.routing.allocation.enable" : "none"
|
|
|
}
|
|
|
}'
|
|
|
//关闭节点平衡
|
|
@@ -124,12 +126,12 @@ curl -H 'Content-Type: application/json' -XPUT http://192.168.3.149:9200/_cluste
|
|
|
}'
|
|
|
|
|
|
//手动移动节点
|
|
|
-curl -XPOST 'http://127.0.0.1:9800/_cluster/reroute' -d '{
|
|
|
+curl -H 'Content-Type: application/json' -XPOST 'http://192.168.3.241:9205/_cluster/reroute' -d '{
|
|
|
"commands" : [ {
|
|
|
"move" :
|
|
|
{
|
|
|
- "index": "qyxy_v2", "shard": 12,
|
|
|
- "from_node": "node_12", "to_node": "node_1"
|
|
|
+ "index": "forecast_v1", "shard": 1,
|
|
|
+ "from_node": "node_1", "to_node": "node_2"
|
|
|
}
|
|
|
}
|
|
|
]
|