Class CloseJobRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.CloseJobRequest
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<CloseJobRequest>
Json deserializer forCloseJobRequest
static final Endpoint<CloseJobRequest,
CloseJobResponse, ErrorResponse> Endpoint "ml.close_job
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Refer to the description for theallow_no_match
query parameter.final Boolean
force()
Refer to the descriptiion for theforce
query parameter.final String
jobId()
Required - Identifier for the anomaly detection job.static CloseJobRequest
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Time
timeout()
Refer to the description for thetimeout
query parameter.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forCloseJobRequest
-
_ENDPOINT
Endpoint "ml.close_job
".
-
-
Method Details
-
of
public static CloseJobRequest of(Function<CloseJobRequest.Builder, ObjectBuilder<CloseJobRequest>> fn) -
allowNoMatch
Refer to the description for theallow_no_match
query parameter.API name:
allow_no_match
-
force
Refer to the descriptiion for theforce
query parameter.API name:
force
-
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
Refer to the description for thetimeout
query parameter.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupCloseJobRequestDeserializer
protected static void setupCloseJobRequestDeserializer(ObjectDeserializer<CloseJobRequest.Builder> op)
-