Class CloseJobRequest
- All Implemented Interfaces:
JsonpSerializable
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 ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<CloseJobRequest>Json deserializer forCloseJobRequeststatic final Endpoint<CloseJobRequest,CloseJobResponse, ErrorResponse> Endpoint "ml.close_job". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanRefer to the description for theallow_no_matchquery parameter.final Booleanforce()Refer to the descriptiion for theforcequery parameter.final StringjobId()Required - Identifier for the anomaly detection job.static CloseJobRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Timetimeout()Refer to the description for thetimeoutquery 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_matchquery parameter.API name:
allow_no_match -
force
Refer to the descriptiion for theforcequery 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_allor by specifying*as the job identifier.API name:
job_id -
timeout
Refer to the description for thetimeoutquery parameter.API name:
timeout -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupCloseJobRequestDeserializer
protected static void setupCloseJobRequestDeserializer(ObjectDeserializer<CloseJobRequest.Builder> op)
-