【Manager Handbook for Distributed AntDB-T】Node Management Related Commands (4): Clean, Deploy, and Adbmgr Promote
clean
Command function:
The Clean command is used to clear all data under the data directory of the nodes in the AntDB cluster. This command assumes that all nodes are in the stop state and not in the cluster. There is no interaction with the clean command, so please execute this command carefully if you need to keep the data. Only the clean all command is supported for now. The specific functions can be viewed through the help command \h clean.
Command format:
CLEAN ALL
CLEAN COORDINATOR { MASTER | SLAVE } { node_name [ , ... ] }
CLEAN DATANODE { MASTER | SLAVE } { node_name [ , ... ] }
CLEAN GTMCOORD { MASTER | SLAVE } node_name
CLEAN MONITOR number_days
CLEAN ZONE zonename
Command example:
-- Empty the contents of the data directory of all nodes in the AntDB cluster (the ADB cluster is in the STOP state):
CLEAN ALL;
-- Empty the data directory of coordinator node:
CLEAN COORDINATOR MASTER coord1;
-- Empty the monitor data from 15 days ago:
CLEAN MONITOR 15;
deploy
Command function: The Deploy command is used to distribute the executable files of machine-compiled AntDB cluster where adbmgr is located to the specified directory on the specified host. It is commonly used when you are just starting to deploy AntDB cluster or when the source code of AntDB cluster has been changed and needs to be recompiled. The specific function can be viewed by the help command \h deploy.
Command format:
DEPLOY { ALL | host_name [, ...] } [ PASSWORD passwd ]
Command example:
-- Distribute the executable to all hosts (all hosts on the host table), with no mutual trust configured between hosts and the password "ls86SDf79":
DEPLOY ALL PASSWORD 'ls86SDf79';
-- Distribute the executable to all hosts (all hosts on the host table), which have configured mutual trust between them:
DEPLOY ALL;
-- Distribute the executable to host1 and host2 hosts, neither of which are configured for mutual trust, and both of which have the password 'ls86SDf79':
DEPLOY host1,host2 PASSWORD 'ls86SDf79';
-- Distribute the executable to host1 and host2 hosts, both of which have been configured for mutual trust:
DEPLOY host1,host2;
adbmgr promote
Command function:
In the NODE table, change the status of the node with the specified name to master, delete the master information of the node, and update the parameter information of the node in the PARAM table. This command is mainly used in the subsequent step-by-step processing of FAILOVER errors. The specific functions can be viewed through the help command \h adbmgr promote.
Command format:
ADBMGR PROMOTE { GTMCOORD | DATANODE } SLAVE node_name
Command example:
-- Update the status of datanode slave datanode1 to master in the node table and param table on the adbmgr side:
ADBMGR PROMOTE DATANODE SLAVE datanode1;