Note
This view is available starting with V4.2.0.
Purpose
This view displays the load balancing jobs currently being executed by all tenants. Each tenant can have only one load balancing job (JOB) running at a time. Each load balancing job generates multiple load balancing tasks (TASK), which are used to perform the specific operations of load balancing.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| JOB_ID | bigint(20) | NO | The ID of the load balancing job. |
| CREATE_TIME | timestamp(6) | NO | The creation time. |
| MODIFY_TIME | timestamp(6) | NO | The time when the information was last updated. |
| BALANCE_STRATEGY | varchar(64) | NO | The name of the balancing strategy.
|
| JOB_TYPE | varchar(64) | NO | The task type.
|
| TARGET_UNIT_NUM | bigint(20) | NO | The number of units to be changed in each zone. |
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | The number of primary zones to be changed. |
| STATUS | varchar(64) | NO | The task status.
|
| COMMENT | longtext | YES | The comment. |
| MAX_END_TIME | timestamp(6) | YES | The maximum end time of the load balancing task.
NoteFor V4.3.x versions, this view is available starting with V4.3.4. For V4.2.x versions, this column is available starting with V4.2.4. |
Sample query
Query the load balancing jobs currently being executed by all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOBS;
The query result is as follows:
+-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
| TENANT_ID | JOB_ID | CREATE_TIME | MODIFY_TIME | BALANCE_STRATEGY | JOB_TYPE | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME |
+-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
| 1002 | 68699 | 2024-12-31 17:24:16.758260 | 2024-12-31 17:24:16.758260 | manual transfer partition | TRANSFER_PARTITION | 3 | 1 | DOING | NULL | NULL |
+-----------+--------+----------------------------+----------------------------+---------------------------+--------------------+-----------------+-------------------------+--------+---------+--------------+
1 row in set
References
Query the history of log stream-level load balancing jobs (Job) of all tenants: CDB_OB_BALANCE_JOB_HISTORY
Query the log stream-level load balancing tasks (Task) of all tenants:
Query the tablet-level load balancing tasks (Task) of all tenants:
Query the Transfer Partition tasks (Task) of all tenants:
For more information about data load balancing, see Data load balancing.