flush-job.asciidoc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --
  2. :api: flush-job
  3. :request: FlushJobRequest
  4. :response: FlushJobResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Flush Job API
  8. The Flush Job API provides the ability to flush a {ml} job's
  9. datafeed in the cluster.
  10. It accepts a +{request}+ object and responds
  11. with a +{response}+ object.
  12. [id="{upid}-{api}-request"]
  13. ==== Flush Job Request
  14. A +{request}+ object gets created with an existing non-null `jobId`.
  15. All other fields are optional for the request.
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. <1> Constructing a new request referencing an existing `jobId`
  21. ==== Optional Arguments
  22. The following arguments are optional.
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-request-options]
  26. --------------------------------------------------
  27. <1> Set request to calculate the interim results
  28. <2> Set the advanced time to flush to the particular time value
  29. <3> Set the start time for the range of buckets on which
  30. to calculate the interim results (requires `calc_interim` to be `true`)
  31. <4> Set the end time for the range of buckets on which
  32. to calculate interim results (requires `calc_interim` to be `true`)
  33. <5> Set the skip time to skip a particular time value
  34. [id="{upid}-{api}-response"]
  35. ==== Flush Job Response
  36. A +{response}+ contains an acknowledgement and an optional end date for the
  37. last finalized bucket
  38. ["source","java",subs="attributes,callouts,macros"]
  39. --------------------------------------------------
  40. include-tagged::{doc-tests-file}[{api}-response]
  41. --------------------------------------------------
  42. <1> `isFlushed()` indicates if the job was successfully flushed or not.
  43. <2> `getLastFinalizedBucketEnd()` provides the timestamp
  44. (in milliseconds-since-the-epoch) of the end of the last bucket that was processed.
  45. include::../execution.asciidoc[]