getClusterChunksStatus
Syntax
getClusterChunksStatus()
Details
Return the metadata about all database chunks (file chunks and tablet chunks) on the data nodes in a cluster. It can be executed only on a controller.
Return a table containing the following columns:
chunkId: the chunk ID
file: the chunk path
size: The disk space occupied by the file chunk (in Bytes). Return 0 for a tablet chunk. Use
getTabletsMeta
to check the disk usage of a tablet chunk.version: version number
vcLength: length of the version chain
versionChain: the version chain
state: the status of the chunk. It can be
CONSTRUCTING: in transaction;
RECOVERING: recovering;
COMPLETE: transaction completed
replicas: distribution of replicas
replicaCount: the number of replicas
lastUpdated: lastUpdated: the timestamp of the latest update. Please note that lastUpdated column is supported since version 1.30.20. For a chunk created before version 1.30.20, it returns a NULL value.
permission: the chunk permission. It can be READ_ONLY and READ_WRITE (default). Chunks that are being transferred or stored in S3 are READ_ONLY.
For READ_ONLY chunks:
(1) Data cannot be appended or updated. Only drop operations can be performed to delete records. Transaction is supported in the READ_ONLY chunks (except for those stored in S3).
(2) Operations such as recovery and rebalance cannot be performed.
Examples
$ rpc(getControllerAlias(), getClusterChunksStatus);
chunkId |
file |
size |
version |
vcLength |
versionChain |
state |
replicas |
replicaCount |
lastUpdated |
permission |
---|---|---|---|---|---|---|---|---|---|---|
092d5e12-e595-6f… |
/testDB/pt2.tbl |
49 |
1 |
1 |
2052:49:1 -> |
COMPLETE |
P1-node1:1:0,P2-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |
42936e31-8be0-fa… |
/testDB/9/i |
0 |
2 |
2 |
2053:0:2 -> 2051… |
COMPLETE |
P3-node1:2:0,P1-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |
d31e6b47-18f0-37… |
/testDB/7/i |
0 |
2 |
2 |
2053:0:2 -> 2051… |
COMPLETE |
P1-node1:2:0,P2-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |
647a5fd6-cd85-3b… |
/testDB/6/i |
0 |
2 |
2 |
2053:0:2 -> 2051… |
COMPLETE |
P1-node1:2:0,P3-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |
8bec6445-bc6d-36… |
/testDB/5/i |
0 |
2 |
2 |
2053:0:2 -> 2051… |
COMPLETE |
P2-node1:2:0,P3-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |
ca690ba5-be73-a6… |
/testDB/4/i |
0 |
2 |
2 |
2053:0:2 -> 2051… |
COMPLETE |
P3-node1:2:0,P1-… |
2 |
2022.03.31T18:09:41.138 |
READ_WRITE |