mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 13:22:57 +00:00
* chore: bump main branch version to 1.0.0-beta.1 Signed-off-by: discord9 <discord9@163.com> * rename beta.1 to beta1 Signed-off-by: discord9 <discord9@163.com> * again Signed-off-by: discord9 <discord9@163.com> * test: correct redact version Signed-off-by: discord9 <discord9@163.com> * chore Signed-off-by: discord9 <discord9@163.com> --------- Signed-off-by: discord9 <discord9@163.com>
109 lines
7.2 KiB
Plaintext
109 lines
7.2 KiB
Plaintext
USE INFORMATION_SCHEMA;
|
|
|
|
Affected Rows: 0
|
|
|
|
DESC TABLE CLUSTER_INFO;
|
|
|
|
+----------------------+----------------------+-----+------+---------+---------------+
|
|
| Column | Type | Key | Null | Default | Semantic Type |
|
|
+----------------------+----------------------+-----+------+---------+---------------+
|
|
| peer_id | Int64 | | NO | | FIELD |
|
|
| peer_type | String | | NO | | FIELD |
|
|
| peer_addr | String | | YES | | FIELD |
|
|
| peer_hostname | String | | YES | | FIELD |
|
|
| total_cpu_millicores | Int64 | | NO | | FIELD |
|
|
| total_memory_bytes | Int64 | | NO | | FIELD |
|
|
| cpu_usage_millicores | Int64 | | NO | | FIELD |
|
|
| memory_usage_bytes | Int64 | | NO | | FIELD |
|
|
| version | String | | NO | | FIELD |
|
|
| git_commit | String | | NO | | FIELD |
|
|
| start_time | TimestampMillisecond | | YES | | FIELD |
|
|
| uptime | String | | YES | | FIELD |
|
|
| active_time | String | | YES | | FIELD |
|
|
| node_status | String | | YES | | FIELD |
|
|
+----------------------+----------------------+-----+------+---------+---------------+
|
|
|
|
-- SQLNESS REPLACE version node_version
|
|
-- SQLNESS REPLACE (\d+\.\d+(?:\.\d+)*-[a-zA-Z0-9.-]+) Version
|
|
-- SQLNESS REPLACE (\s[a-z0-9]{7,10}\s) Hash
|
|
-- SQLNESS REPLACE (\s[\-0-9T:\.]{19,}) Start_time
|
|
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
|
|
-- SQLNESS REPLACE (\s127\.0\.0\.1:\d+\s) Address
|
|
-- SQLNESS REPLACE [\s\-]+
|
|
SELECT peer_id, peer_type, peer_addr, version, git_commit, start_time, uptime, active_time FROM CLUSTER_INFO ORDER BY peer_type;
|
|
|
|
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|0|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||1|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||2|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||0|FLOWNODE|Address|Version|Hash|Start_time|Duration|Duration||1|FRONTEND|Address|Version|Hash|Start_time|Duration|Duration||1|METASRV|Address|Version|Hash|Start_time|Duration||+++++++++
|
|
|
|
-- SQLNESS REPLACE version node_version
|
|
-- SQLNESS REPLACE (\d+\.\d+(?:\.\d+)*-[a-zA-Z0-9.-]+) Version
|
|
-- SQLNESS REPLACE (\s[a-z0-9]{7,10}\s) Hash
|
|
-- SQLNESS REPLACE (\s[\-0-9T:\.]{19,}) Start_time
|
|
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
|
|
-- SQLNESS REPLACE (\s127\.0\.0\.1:\d+\s) Address
|
|
-- SQLNESS REPLACE [\s\-]+
|
|
SELECT peer_id, peer_type, peer_addr, version, git_commit, start_time, uptime, active_time FROM CLUSTER_INFO WHERE PEER_TYPE = 'METASRV' ORDER BY peer_type;
|
|
|
|
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|1|METASRV|Address|Version|Hash|Start_time|Duration||+++++++++
|
|
|
|
-- SQLNESS REPLACE version node_version
|
|
-- SQLNESS REPLACE (\d+\.\d+(?:\.\d+)*-[a-zA-Z0-9.-]+) Version
|
|
-- SQLNESS REPLACE (\s[a-z0-9]{7,10}\s) Hash
|
|
-- SQLNESS REPLACE (\s[\-0-9T:\.]{19,}) Start_time
|
|
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
|
|
-- SQLNESS REPLACE (\s127\.0\.0\.1:\d+\s) Address
|
|
-- SQLNESS REPLACE [\s\-]+
|
|
SELECT peer_id, peer_type, peer_addr, version, git_commit, start_time, uptime, active_time FROM CLUSTER_INFO WHERE PEER_TYPE = 'FRONTEND' ORDER BY peer_type;
|
|
|
|
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|1|FRONTEND|Address|Version|Hash|Start_time|Duration|Duration|+++++++++
|
|
|
|
-- SQLNESS REPLACE version node_version
|
|
-- SQLNESS REPLACE (\d+\.\d+(?:\.\d+)*-[a-zA-Z0-9.-]+) Version
|
|
-- SQLNESS REPLACE (\s[a-z0-9]{7,10}\s) Hash
|
|
-- SQLNESS REPLACE (\s[\-0-9T:\.]{19,}) Start_time
|
|
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
|
|
-- SQLNESS REPLACE (\s127\.0\.0\.1:\d+\s) Address
|
|
-- SQLNESS REPLACE [\s\-]+
|
|
SELECT peer_id, peer_type, peer_addr, version, git_commit, start_time, uptime, active_time FROM CLUSTER_INFO WHERE PEER_TYPE != 'FRONTEND' ORDER BY peer_type;
|
|
|
|
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|0|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||1|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||2|DATANODE|Address|Version|Hash|Start_time|Duration|Duration||0|FLOWNODE|Address|Version|Hash|Start_time|Duration|Duration||1|METASRV|Address|Version|Hash|Start_time|Duration||+++++++++
|
|
|
|
-- SQLNESS REPLACE version node_version
|
|
-- SQLNESS REPLACE (\d+\.\d+(?:\.\d+)*-[a-zA-Z0-9.-]+) Version
|
|
-- SQLNESS REPLACE (\s[a-z0-9]{7,10}\s) Hash
|
|
-- SQLNESS REPLACE (\s[\-0-9T:\.]{19,}) Start_time
|
|
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
|
|
-- SQLNESS REPLACE (\s127\.0\.0\.1:\d+\s) Address
|
|
-- SQLNESS REPLACE [\s\-]+
|
|
SELECT peer_id, peer_type, peer_addr, version, git_commit, start_time, uptime, active_time FROM CLUSTER_INFO WHERE PEER_ID > 1 ORDER BY peer_type;
|
|
|
|
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|2|DATANODE|Address|Version|Hash|Start_time|Duration|Duration|+++++++++
|
|
|
|
-- SQLNESS REPLACE (:\s*(\".*?\"|\[.*?\]|\{.*?\}|[0-9]+|true|false|null)) PLACEHOLDER
|
|
SELECT peer_id, node_status FROM CLUSTER_INFO WHERE PEER_TYPE = 'DATANODE' ORDER BY peer_id;
|
|
|
|
+---------+------------------------------------------------------------------+
|
|
| peer_id | node_status |
|
|
+---------+------------------------------------------------------------------+
|
|
| 0 | {"workloads"PLACEHOLDER,"leader_regions"PLACEHOLDER,"follower_regions"PLACEHOLDER} |
|
|
| 1 | {"workloads"PLACEHOLDER,"leader_regions"PLACEHOLDER,"follower_regions"PLACEHOLDER} |
|
|
| 2 | {"workloads"PLACEHOLDER,"leader_regions"PLACEHOLDER,"follower_regions"PLACEHOLDER} |
|
|
+---------+------------------------------------------------------------------+
|
|
|
|
SELECT peer_type, total_cpu_millicores!=0, total_memory_bytes!=0 FROM CLUSTER_INFO ORDER BY peer_type;
|
|
|
|
+-----------+-----------------------------------------------+---------------------------------------------+
|
|
| peer_type | cluster_info.total_cpu_millicores != Int64(0) | cluster_info.total_memory_bytes != Int64(0) |
|
|
+-----------+-----------------------------------------------+---------------------------------------------+
|
|
| DATANODE | true | true |
|
|
| DATANODE | true | true |
|
|
| DATANODE | true | true |
|
|
| FLOWNODE | true | true |
|
|
| FRONTEND | true | true |
|
|
| METASRV | true | true |
|
|
+-----------+-----------------------------------------------+---------------------------------------------+
|
|
|
|
USE PUBLIC;
|
|
|
|
Affected Rows: 0
|
|
|