-
Notifications
You must be signed in to change notification settings - Fork 3.7k
branch-4.0: [feat](load) introduce load job system table (#57421) #58850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduce load job statistic system table:
```
mysql> show create table information_schema.load_jobs\G
*************************** 1. row ***************************
Table: load_jobs
Create Table: CREATE TABLE `load_jobs` (
`JOB_ID` text NULL,
`LABEL` text NULL,
`STATE` text NULL,
`PROGRESS` text NULL,
`TYPE` text NULL,
`ETL_INFO` text NULL,
`TASK_INFO` text NULL,
`ERROR_MSG` text NULL,
`CREATE_TIME` text NULL,
`ETL_START_TIME` text NULL,
`ETL_FINISH_TIME` text NULL,
`LOAD_START_TIME` text NULL,
`LOAD_FINISH_TIME` text NULL,
`URL` text NULL,
`JOB_DETAILS` text NULL,
`TRANSACTION_ID` text NULL,
`ERROR_TABLETS` text NULL,
`USER` text NULL,
`COMMENT` text NULL,
`FIRST_ERROR_MSG` text NULL
) ENGINE=SCHEMA;
1 row in set (0.01 sec)
```
User can use the `select * from information_schema.load_jobs` instead of
the `show load`. The advantage is that SQL can be very flexible in
locating jobs.
Example:
```
mysql> SELECT * FROM information_schema.load_jobs WHERE LABEL = 'test_load_job_label_b5347e94f2614e2c92705d6a6824a380'\G
*************************** 1. row ***************************
JOB_ID: 1761643165987
LABEL: test_load_job_label_b5347e94f2614e2c92705d6a6824a380
STATE: FINISHED
PROGRESS: Unknown id: 1761643165987
TYPE: INSERT
ETL_INFO: \N
TASK_INFO: cluster:N/A; timeout(s):14400; max_filter_ratio:0.0
ERROR_MSG: \N
CREATE_TIME: 2025-10-28 17:23:08
ETL_START_TIME: 2025-10-28 17:23:08
ETL_FINISH_TIME: 2025-10-28 17:23:08
LOAD_START_TIME: 2025-10-28 17:23:08
LOAD_FINISH_TIME: 2025-10-28 17:23:09
URL:
JOB_DETAILS: {"ScannedRows":1,"LoadBytes":25,"FileNumber":0,"FileSize":0,"TaskNumber":1,"Unfinished backends":[],"All backends":[1754377661179]}
TRANSACTION_ID: 72076
ERROR_TABLETS: {}
USER: root
COMMENT:
FIRST_ERROR_MSG:
```
|
run buildall |
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
pick #57421
Introduce load job statistic system table:
User can use the
select * from information_schema.load_jobsinstead of theshow load. The advantage is that SQL can be very flexible in locating jobs.Example:
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)