Class CloseJobRequest

All Implemented Interfaces:

public class CloseJobRequest
extends RequestBase
implements JsonpSerializable
Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. When a datafeed that has a specified end date stops, it automatically closes its associated job.
See Also:
API specification
  • Field Details

  • Method Details

    • of

      public static CloseJobRequest of​(java.util.function.Function<CloseJobRequest.Builder,​ObjectBuilder<CloseJobRequest>> fn)
    • allowNoJobs

      @Deprecated @Nullable public final java.lang.Boolean allowNoJobs()
      7.10.0 Use allow_no_match instead.
      Whether to ignore if a wildcard expression matches no jobs. (This includes _all string or when no jobs have been specified)

      API name: allow_no_jobs

    • allowNoMatch

      @Nullable public final java.lang.Boolean allowNoMatch()
      Refer to the description for the allow_no_match query parameter.

      API name: allow_no_match

    • force

      @Nullable public final java.lang.Boolean force()
      Refer to the descriptiion for the force query parameter.

      API name: force

    • jobId

      public final java.lang.String jobId()
      Required - Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a comma-separated list of jobs, or a wildcard expression. You can close all jobs by using _all or by specifying * as the job identifier.

      API name: job_id

    • timeout

      @Nullable public final Time timeout()
      Refer to the description for the timeout query parameter.

      API name: timeout

    • serialize

      public void serialize​( generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​( generator, JsonpMapper mapper)
    • setupCloseJobRequestDeserializer

      protected static void setupCloseJobRequestDeserializer​(ObjectDeserializer<CloseJobRequest.Builder> op)