pending.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. [[cluster-pending]]
  2. == Pending cluster tasks
  3. The pending cluster tasks API returns a list of any cluster-level changes
  4. (e.g. create index, update mapping, allocate or fail shard) which have not yet
  5. been executed.
  6. [source,js]
  7. --------------------------------------------------
  8. $ curl -XGET 'http://localhost:9200/_cluster/pending_tasks'
  9. --------------------------------------------------
  10. Usually this will return an empty list as cluster-level changes are usually
  11. fast. However if there are tasks queued up, the output will look something
  12. like this:
  13. [source,js]
  14. --------------------------------------------------
  15. {
  16. "tasks": [
  17. {
  18. "insert_order": 101,
  19. "priority": "URGENT",
  20. "source": "create-index [foo_9], cause [api]",
  21. "time_in_queue_millis": 86,
  22. "time_in_queue": "86ms"
  23. },
  24. {
  25. "insert_order": 46,
  26. "priority": "HIGH",
  27. "source": "shard-started ([foo_2][1], node[tMTocMvQQgGCkj7QDHl3OA], [P], s[INITIALIZING]), reason [after recovery from gateway]",
  28. "time_in_queue_millis": 842,
  29. "time_in_queue": "842ms"
  30. },
  31. {
  32. "insert_order": 45,
  33. "priority": "HIGH",
  34. "source": "shard-started ([foo_2][0], node[tMTocMvQQgGCkj7QDHl3OA], [P], s[INITIALIZING]), reason [after recovery from gateway]",
  35. "time_in_queue_millis": 858,
  36. "time_in_queue": "858ms"
  37. }
  38. ]
  39. }
  40. --------------------------------------------------