From b48344f29696b10e0efff9314941d79786d779c5 Mon Sep 17 00:00:00 2001 From: Clinton Gormley Date: Fri, 29 Nov 2013 08:21:26 +0100 Subject: [PATCH] [DOCS] Doc'ed cluster pending tasks --- docs/reference/cluster.asciidoc | 2 ++ docs/reference/cluster/pending.asciidoc | 44 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 docs/reference/cluster/pending.asciidoc diff --git a/docs/reference/cluster.asciidoc b/docs/reference/cluster.asciidoc index 60971a5853b..6c7e4d7eb28 100644 --- a/docs/reference/cluster.asciidoc +++ b/docs/reference/cluster.asciidoc @@ -33,6 +33,8 @@ include::cluster/health.asciidoc[] include::cluster/state.asciidoc[] +include::cluster/pending.asciidoc[] + include::cluster/reroute.asciidoc[] include::cluster/update-settings.asciidoc[] diff --git a/docs/reference/cluster/pending.asciidoc b/docs/reference/cluster/pending.asciidoc new file mode 100644 index 00000000000..0e018e414ff --- /dev/null +++ b/docs/reference/cluster/pending.asciidoc @@ -0,0 +1,44 @@ +[[cluster-pending]] +== Pending cluster tasks + +The pending cluster tasks API returns a list of any cluster-level changes +(e.g. create index, update mapping, allocate or fail shard) which have not yet +been executed. + +[source,js] +-------------------------------------------------- +$ curl -XGET 'http://localhost:9200/_cluster/pending_tasks' +-------------------------------------------------- + +Usually this will return an empty list as cluster-level changes are usually +fast. However if there are tasks queued up, the output will look something +like this: + +[source,js] +-------------------------------------------------- +{ + "tasks": [ + { + "insert_order": 101, + "priority": "URGENT", + "source": "create-index [foo_9], cause [api]", + "time_in_queue_millis": 86, + "time_in_queue": "86ms" + }, + { + "insert_order": 46, + "priority": "HIGH", + "source": "shard-started ([foo_2][1], node[tMTocMvQQgGCkj7QDHl3OA], [P], s[INITIALIZING]), reason [after recovery from gateway]", + "time_in_queue_millis": 842, + "time_in_queue": "842ms" + }, + { + "insert_order": 45, + "priority": "HIGH", + "source": "shard-started ([foo_2][0], node[tMTocMvQQgGCkj7QDHl3OA], [P], s[INITIALIZING]), reason [after recovery from gateway]", + "time_in_queue_millis": 858, + "time_in_queue": "858ms" + } + ] +} +--------------------------------------------------