set-upgrade-mode.asciidoc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --
  2. :api: set-upgrade-mode
  3. :request: SetUpgradeModeRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Set Upgrade Mode API
  8. The Set Upgrade Mode API temporarily halts all {ml} job and {dfeed} tasks when `enabled=true`. Their
  9. reported states remain unchanged. Consequently, when exiting upgrade mode the halted {ml} jobs and
  10. {dfeeds} will return to their previous state.
  11. It accepts a +{request}+ object and responds with a +{response}+ object.
  12. When `enabled=true`, no new jobs can be opened, and no job or {dfeed} tasks will
  13. be running. Be sure to set `enabled=false` once upgrade actions are completed.
  14. [id="{upid}-{api}-request"]
  15. ==== Set Upgrade Mode Request
  16. A +{request}+ object gets created setting the desired `enabled` state.
  17. ["source","java",subs="attributes,callouts,macros"]
  18. --------------------------------------------------
  19. include-tagged::{doc-tests-file}[{api}-request]
  20. --------------------------------------------------
  21. <1> Constructing a new request referencing enabling upgrade mode
  22. <2> Optionally setting the `timeout` value for how long the
  23. execution should wait.
  24. [id="{upid}-{api}-response"]
  25. ==== Set Upgrade Mode Response
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-response]
  29. --------------------------------------------------
  30. <1> `isAcknowledged()` from the +{response}+ indicates if the setting was set successfully.
  31. include::../execution.asciidoc[]