feat: datanode support report number of regions to meta (#838)

* feat: dn support report number of regions to meta

* put the heartbeat batch to store

* cr: change region_number's parameter to &CatalogManagerRef

* cr: when dn failed to get region number, report region_num = -1 to meta
This commit is contained in:
fys
2023-01-09 16:13:53 +08:00
committed by GitHub
parent 2679faf911
commit 9e58311ecd
10 changed files with 332 additions and 32 deletions
+8 -8
View File
@@ -34,13 +34,13 @@ message HeartbeatRequest {
message NodeStat {
// The read capacity units during this period
uint64 rcus = 1;
int64 rcus = 1;
// The write capacity units during this period
uint64 wcus = 2;
int64 wcus = 2;
// How many tables on this node
uint64 table_num = 3;
int64 table_num = 3;
// How many regions on this node
uint64 region_num = 4;
int64 region_num = 4;
double cpu_usage = 5;
double load = 6;
@@ -57,13 +57,13 @@ message RegionStat {
uint64 region_id = 1;
TableName table_name = 2;
// The read capacity units during this period
uint64 rcus = 3;
int64 rcus = 3;
// The write capacity units during this period
uint64 wcus = 4;
int64 wcus = 4;
// Approximate bytes of this region
uint64 approximate_bytes = 5;
int64 approximate_bytes = 5;
// Approximate number of rows in this region
uint64 approximate_rows = 6;
int64 approximate_rows = 6;
// Others
map<string, string> attrs = 100;