栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

lightdb22.2-新增集群启停脚本

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

lightdb22.2-新增集群启停脚本

lightdb22.2 - 新增集群启停脚本

lightdb22.2 版本新增了集群启停脚本,脚本名为lightdb_service.py。使用python2.7开发。使用该脚本会对涉及的lightdb,ltcluster,keepalive 进行相应操作。

由于需要依赖installer安装后生成的json文件来获取集群信息,目前此脚本只能用于通过installer安装的数据库集群,且需要使用root用户执行(因为涉及keepalive的启停,需要root权限)。

用法
usage: lightdb_service.py [-h] [-F OP_INSTALL_INFO]
                          [-c {start,stop,restart,status}] [-C] [-D] [-P] [-S]
                          [--dry-run] [-f] [-B ] [-v] [-q]
                          [-l ]

optional arguments:
  -h, --help            show this help message and exit
  -F OP_INSTALL_INFO, --filename OP_INSTALL_INFO
                        specifies the path to a json file containing
                        installation information
  -c {start,stop,restart,status}, --command {start,stop,restart,status}
                        start/stop/restart/status lightdb service
  -C, --cn_only         only start/stop coordinator node
  -D, --dn_only         only start/stop data node
  -P, --primary_only    only start/stop primary node for primary restart
  -S, --standby_only    only start/stop standby node for standby restart
  --dry-run             show what would happen for action, but don't execute
                        it
  -f, --force           force stop of cluster even if some nodes are in
                        incorrect state, skip incorrect nodes
  -B , --parallel 
                        number of segment hosts to run in parallel. Default is
                        1
  -v, --verbose         debug print
  -q, --quiet           suppress status messages for stdout logging
  -l , --log_dir 
                        Logfile directory, default is /tmp/ltAdminLogs

启动/停止/重启当前集群
lightdb_service.py -c start/stop/restart
启动/停止/重启所有CN节点
lightdb_service.py -c start/stop/restart --cn_only 
启动/停止/重启所有DN节点
lightdb_service.py -c start/stop/restart --dn_only 
启动/停止/重启所有主节点
lightdb_service.py -c start/stop/restart --primary_only 
启动/停止/重启所有备节点
lightdb_service.py -c start/stop/restart --standby_only 
在启动/停止/重启对DN节点进行并发处理
lightdb_service.py -c start/stop/restart --parallel 4 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/996583.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号