Skip to content

[Load] Add more info in SHOW LOAD result#3391

Merged
morningman merged 3 commits intoapache:masterfrom
morningman:more_load_info
Apr 26, 2020
Merged

[Load] Add more info in SHOW LOAD result#3391
morningman merged 3 commits intoapache:masterfrom
morningman:more_load_info

Conversation

@morningman
Copy link
Contributor

@morningman morningman commented Apr 24, 2020

Fix #3390
This CL add more info in JobDetails column of SHOW LOAD result for Broker Load Job.

For example:

{
	"Unfinished backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002]
	},
        "All backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002, 10004, 10006]
	},
	"ScannedRows": 2390016,
	"TaskNumber": 1,
	"FileNumber": 1,
	"FileSize": 1073741824
}

2 newly added keys:

Unfinished backends indicates the BE which task on them are not finished.
All backends indicates the BE which this job has tasks on it.

One more thing, I pass the Backend Id along with the heartbeat msg from FE to BE, so that BE can
know the Id of themselves.

}

public synchronized void updateLoad(TUniqueId loadId, TUniqueId fragmentId, long rows) {
public synchronized void updateLoadProgress(long beId, TUniqueId loadId, TUniqueId fragmentId, long rows,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change “beId” to ”backendId“ is better,at before you use unfinished“BackendIds” and all”BackendIds“

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

public synchronized void clearAllLoads() {
counterTbl.clear();
if (isDone && unfinishedBackendIds.containsKey(loadId)) {
unfinishedBackendIds.get(loadId).remove(beId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can unfinishedBackendIds.get(loadId) be empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't, there is at least one BE for a load job

Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman merged commit 9a934ec into apache:master Apr 26, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Apr 28, 2020
Fix apache#3390
This CL add more info in `JobDetails` column of `SHOW LOAD` result for Broker Load Job.

For example:
```
{
	"Unfinished backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002]
	},
        "All backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002, 10004, 10006]
	},
	"ScannedRows": 2390016,
	"TaskNumber": 1,
	"FileNumber": 1,
	"FileSize": 1073741824
}
```

2 newly added keys:

`Unfinished backends` indicates the BE which task on them are not finished.
`All backends` indicates the BE which this job has tasks on it.

One more thing, I pass the Backend Id along with the heartbeat msg from FE to BE, so that BE can
know the Id of themselves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Load] Not easy to track the progress of broker load job

3 participants