Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Feb 25, 2015

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.

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.
@bleskes bleskes changed the title API: add pending task count to cluster health API: add pending tasks count to cluster health Feb 25, 2015
@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, will do.

@s1monw
Copy link
Contributor

s1monw commented Feb 25, 2015

left some minor comments - LGTM otherwise

numberOfPendingTasks = in.readVInt();
} else {
numberOfPendingTasks = 0;
}
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

bleskes added a commit that referenced this pull request Feb 25, 2015
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
@bleskes bleskes closed this in 6953777 Feb 25, 2015
@bleskes bleskes deleted the pending_tasks_cluster_health branch February 25, 2015 13:59
@clintongormley clintongormley added :Data Management/Stats Statistics tracking and retrieval APIs and removed review :Data Management/CAT APIs Text APIs behind /_cat :Core/Infra/REST API REST infrastructure and utilities labels Mar 19, 2015
@clintongormley clintongormley changed the title API: add pending tasks count to cluster health Add pending tasks count to cluster health Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants