2025年缩容是什么意思_梯度压缩

缩容是什么意思_梯度压缩一 查看集群状态 tiup cluster display cluster default 二 进行缩容 tiup cluster scale in cluster default N x x x x 20160 Starting component cluster root tiup components cluster v1 7 0 tiup cluster

一、查看集群状态

 tiup cluster display cluster-default

二、进行缩容

# tiup cluster scale-in cluster-default  -N "x.x.x.x:20160"
Starting component `cluster`: /root/.tiup/components/cluster/v1.7.0/tiup-cluster scale-in cluster-default -N x.x.x.x:20160
This operation will delete the x.x.x.x:20160 nodes in `cluster-default` and all their data.
Do you want to continue? [y/N]:(default=N) y
Scale-in nodes...
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/cluster-default/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/cluster-default/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=x.x.x.x
+ [ Serial ] - ClusterOperate: operation=ScaleInOperation, options={Roles:[] Nodes:[x.x.x.x:20160] Force:false SSHTimeout:5 OptTimeout:120 APITimeout:300 IgnoreConfigCheck:false NativeSSH:false SSHType: Concurrency:5 SSHProxyHost: SSHProxyPort:22 SSHProxyUser:root SSHProxyIdentity:/root/.ssh/id_rsa SSHProxyUsePassword:false SSHProxyTimeout:5 CleanupData:false CleanupLog:false RetainDataRoles:[] RetainDataNodes:[] ShowUptime:false DisplayMode:default Operation:StartOperation}
The component `tikv` will become tombstone, maybe exists in several minutes or hours, after that you can use the prune command to clean it
+ [ Serial ] - UpdateMeta: cluster=cluster-default, deleted=`''`
+ [ Serial ] - UpdateTopology: cluster=cluster-default
+ Refresh instance configs
- Regenerate config pd -> x.x.x.x:2379 ... Done
- Regenerate config pd -> x.x.x.x:2379 ... Done
- Regenerate config pd -> x.x.x.x:2379 ... Done
- Regenerate config tikv -> x.x.x.x:20160 ... Done
- Regenerate config tikv -> x.x.x.x:20160 ... Done
- Regenerate config tikv -> x.x.x.x:20160 ... Done
- Regenerate config tidb -> x.x.x.x:4000 ... Done
- Regenerate config tiflash -> x.x.x.x:9000 ... Done
- Regenerate config prometheus -> x.x.x.x:9090 ... Done
- Regenerate config grafana -> x.x.x.x:3000 ... Done
- Regenerate config alertmanager -> x.x.x.x:9093 ... Done
+ [ Serial ] - SystemCtl: host=x.x.x.x action=reload prometheus-9090.service
Scaled cluster `cluster-default` in successfully

三、销毁节点

Scale-in后,节点状态是Tombstone

tiup cluster prune cluster-default 销毁

注: 如果Server在内网环境下,下线的时候代码中会访问”github.com/pingcap/tiup/pkg/cluster/executor“地址,所以会报错;

“”stderr”: “”, “__hash__”: “1d1478dbec0d06ef5e909d3323331914538d4cb0”, “__func__”: “github.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Execute“, “hit”: false}”

如果失败,可以添加–force强制销毁

tiup cluster prune cluster-default --force
编程小号
上一篇 2025-01-28 12:17
下一篇 2025-01-30 07:06

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/120253.html