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
Add pending tasks count to cluster health #9877
Conversation
The number of current pending tasks is useful to detect and overloaded master. This commit adds it to the cluster health API. The complete list can be retrieved from the dedicated pending tasks API. It also adds rest tests for the cluster health variants.
@@ -10,8 +10,8 @@ timestamping. | |||
% curl 192.168.56.10:9200/_cat/health | |||
1384308967 18:16:07 foo green 3 3 3 3 0 0 0 | |||
% curl '192.168.56.10:9200/_cat/health?v&ts=0' | |||
cluster status nodeTotal nodeData shards pri relo init unassign | |||
foo green 3 3 3 3 0 0 0 | |||
cluster status nodeTotal nodeData shards pri relo init unassign tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be good to name it pending_tasks
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, will do.
left some minor comments - LGTM otherwise |
numberOfPendingTasks = in.readVInt(); | ||
} else { | ||
numberOfPendingTasks = 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this a regular "readInt" call, and use -1
to denote that we couldn't compute it? otherwise, 0 can be very misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
The number of current pending tasks is useful to detect and overloaded master. This commit adds it to the cluster health API. The complete list can be retrieved from the dedicated pending tasks API. It also adds rest tests for the cluster health variants. Closes #9877
The number of current pending tasks is useful to detect and overloaded master. This commit adds it to the cluster health API. The complete list can be retrieved from the dedicated pending tasks API.
It also adds rest tests for the cluster health variants.