close-job.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --
  2. :api: close-job
  3. :request: CloseJobRequest
  4. :response: CloseJobResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Close Job API
  8. The Close Job API provides the ability to close {ml} jobs in the cluster.
  9. It accepts a +{request}+ object and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Close Job Request
  13. A +{request}+ object gets created with an existing non-null `jobId`.
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Constructing a new request referencing existing job IDs
  19. <2> Optionally used to close a failed job, or to forcefully close a job
  20. which has not responded to its initial close request.
  21. <3> Optionally set to ignore if a wildcard expression matches no jobs.
  22. (This includes `_all` string or when no jobs have been specified)
  23. <4> Optionally setting the `timeout` value for how long the
  24. execution should wait for the job to be closed.
  25. [id="{upid}-{api}-response"]
  26. ==== Close Job Response
  27. ["source","java",subs="attributes,callouts,macros"]
  28. --------------------------------------------------
  29. include-tagged::{doc-tests-file}[{api}-response]
  30. --------------------------------------------------
  31. <1> `isClosed()` from the +{response}+ indicates if the job was successfully
  32. closed or not.
  33. include::../execution.asciidoc[]