Cluster
Enter the dnode_endpoint in hostname:port format. You can also specify the hostname and port as separate parameters.
Create the dnode before starting the corresponding dnode process. The dnode can then join the cluster based on the value of the firstEp parameter. Each dnode is assigned an ID after it joins a cluster.
View Dnodes
The preceding SQL command shows all dnodes in the cluster with the ID, endpoint, and status.
Delete a DNODE
DROP DNODE {dnode_id | dnode_endpoint}
You can delete a dnode by its ID or by its endpoint. Note that deleting a dnode does not stop its process. You must stop the process after the dnode is deleted.
Modify Dnode Configuration
ALTER DNODE dnode_id dnode_option
ALTER ALL DNODES dnode_option
dnode_option: {
'resetLog'
| 'balance' 'value'
| 'monitor' 'value'
| 'debugFlag' 'value'
| 'monDebugFlag' 'value'
| 'vDebugFlag' 'value'
| 'mDebugFlag' 'value'
| 'httpDebugFlag' 'value'
| 'qDebugflag' 'value'
| 'sdbDebugFlag' 'value'
| 'uDebugFlag' 'value'
| 'tsdbDebugFlag' 'value'
| 'sDebugflag' 'value'
| 'rpcDebugFlag' 'value'
| 'dDebugFlag' 'value'
| 'wDebugFlag' 'value'
| 'tmrDebugFlag' 'value'
| 'cqDebugFlag' 'value'
}
is the value of the parameter, which needs to be in character format. For example, modify the log output level of dnode 1 to debug:
CREATE MNODE ON DNODE dnode_id
TDengine automatically creates an mnode on the firstEp node. You can use this statement to create more mnodes for higher system availability. A cluster can have a maximum of three mnodes. Each dnode can contain only one mnode.
View Mnodes
SHOW MNODES;
This statement shows all mnodes in the cluster with the ID, dnode, and status.
Delete an Mnode
DROP MNODE ON DNODE dnode_id;
This statement deletes the mnode located on the specified dnode.
Create a Qnode
SHOW QNODES;
This statement shows all qnodes in the cluster with the ID and dnode.
Delete a Qnode
DROP QNODE ON DNODE dnode_id;
This statement deletes the mnode located on the specified dnode. This does not affect the status of the dnode.
Modify Client Configuration
The client configuration can also be modified in a similar way to other cluster components.
ALTER LOCAL local_option
local_option: {
'resetLog'
| 'rpcDebugFlag' 'value'
| 'tmrDebugFlag' 'value'
| 'cDebugFlag' 'value'
| 'uDebugFlag' 'value'
}
The parameters that you can modify through this statement are the same as those located in the client configuration file. Modifications that you make through this statement take effect immediately, while modifications to the configuration file take effect when the client restarts.