Repository navigation
Add task start status to worker report - #13263
Conversation
cryptoe
left a comment
There was a problem hiding this comment.
Thanks for the PR @adarshsanjeev .
Minor comments, LGTM overall. Please add the new payload in the PR description.
Will approve once the minor comments are looked into.
LakshSingla
left a comment
There was a problem hiding this comment.
Thanks for the PR! Left some minor comments on the same
|
Should this change be documented somewhere? Perhaps in the release notes if there's no appropriate section in the documentation? |
|
I think 2 doc lines should be added here: https://github.com/apache/druid/blob/master/docs/multi-stage-query/api.md#L555 |
| * Returns a pair which contains the number of currently running worker tasks and the number of worker tasks that are | ||
| * not yet fully started as left and right respectively. | ||
| */ | ||
| public Pair<Integer, Integer> getWorkerTaskStatus() |
There was a problem hiding this comment.
Code style question, would it be clearer if instead of a Pair, we create a simple class (in the task launcher itself) that encapsulates these numbers? I am fine either way since this is used only once, but it would be clearer to read if someone is just going through the ControllerImpl class.
PR LGTM apart from this. Thanks!
There was a problem hiding this comment.
I did consider that, but since it is only used in a single place, I used a Pair, to avoid creating a class for a single call.
* Add task start status to worker report * Address review comments * Address review comments * Update documentation * Update spelling checks
Adds two new fields to the worker report, pendingTasks and runningTasks.
These indicate the number of tasks (including controller) that are in pending and and have already fully started. These can be used in the UI to better communicate the state of a task. Since the controller running is a prerequisite for the worker report, the running task number will be at least 1.
New payload:
This PR has: