fix: rest api /api/executors
does not show executors if TaskSchedulingPolicy::PullStaged
#1175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #1174.
Rationale for this change
Rest api reports correct number of registered executors in case of
TaskSchedulingPolicy::PullStaged
What changes are included in this PR?
In case
TaskSchedulingPolicy::PullStaged
is configured, executor registration is slightly different and no heartbeat are sent from executor to client. rest api method returning executors will call method which will first call heartbeats status and then consult registered executor list. This change will revert that order.As heartbeat is not available there is no information about when is executor last seen, so rest api will return None in that case. This behaviour can be changed, we can add additional field in ExecutorMetadata indicating when was the last time executor called scheduler.
Are there any user-facing changes?
No