分片shards管理

2022-11-07  本文已影响0人  emperorxiaomai

设置Analyze最大流量

SET global "stats.service.max_bytes_per_sec"='10m'

log filter

SET GLOBAL "stats.jobs_log_filter" = 'ended - started > 100';

ALTER TABLE .. REROUTE PROMOTE REPLICA

Routing失败重试

ALTER CLUSTER REROUTE RETRY FAILED

设置 recovery并行数量

SET GLOBAL "cluster.routing.allocation.node_concurrent_recoveries" = '100';

设置recovery写入量

SET GLOBAL "indices.recovery.max_bytes_per_sec" = '50mb';

设置并行rebalance个分片个数

cluster.routing.allocation.cluster_concurrent_rebalance
Default: 2
Runtime: yes
Defines how many concurrent rebalancing tasks are allowed across all nodes

设置一个节点主分片并行恢复数量

cluster.routing.allocation.node_initial_primaries_recoveries
Default: 4
Runtime: yes
Defines how many concurrent primary shard recoveries are allowed on a node.
Since primary recoveries use data that is already on disk (as opposed to inter-node recoveries), recovery should be fast and so this setting can be higher than

并行数

cluster.routing.allocation.node_concurrent_recoveries
Default: 2
Runtime: yes
Defines how many concurrent recoveries are allowed on a node.

decrease shards

alter table test.test_dt set ("routing.allocation.require._name"="10.10.3.19");
alter table test.test_dt set ("blocks.write"=true);
alter table test.test_dt set (number_of_shards = 21);
alter table test.test_dt set ("blocks.write" = false);

建表设置路由分片

CLUSTERED INTO 12 SHARDS WITH ( "number_of_routing_shards" = 48 )

切换表名

SWAP TABLE source TO target [ WITH ( expr = expr [ , ... ] ) ]

切表名

alter table user_voice.da_vocust_hotel_voice rename to da_vocust_hotel_voice_bk;
alter table user_voice.da_vocust_hotel_voice_tmp rename to da_vocust_hotel_voice;

Query Breaker

SET GLOBAL "indices.breaker.query.limit" = '3.0gb';

上一篇 下一篇

猜你喜欢

热点阅读