Module org.elasticsearch.xcore
Class InferTrainedModelDeploymentAction.Request
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.action.support.tasks.BaseTasksRequest<InferTrainedModelDeploymentAction.Request>
org.elasticsearch.xpack.core.ml.action.InferTrainedModelDeploymentAction.Request
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,TransportRequest
- Enclosing class:
InferTrainedModelDeploymentAction
public static class InferTrainedModelDeploymentAction.Request
extends BaseTasksRequest<InferTrainedModelDeploymentAction.Request>
Request for inference against the deployment.
The task gets routed to a node that indicates its local model assignment is started
For indicating timeout, the caller should call `setInferenceTimeout` and not the base class `setTimeout` method
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.core.TimeValuestatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODESFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanforDocs(String id, InferenceConfigUpdate update, List<Map<String, Object>> docs, org.elasticsearch.core.TimeValue inferenceTimeout) forTextInput(String id, InferenceConfigUpdate update, List<String> textInput, org.elasticsearch.core.TimeValue inferenceTimeout) getDocs()getId()org.elasticsearch.core.TimeValueorg.elasticsearch.core.TimeValueThis is always null as we want the inference call to handle the timeout, not the tasks frameworkinthashCode()booleanbooleanbooleanvoidsetChunkResults(boolean chunkResults) voidsetHighPriority(boolean highPriority) voidvoidsetPrefixType(TrainedModelPrefixStrings.PrefixType prefixType) validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
getActions, getNodes, getParentTaskId, getTargetParentTaskId, getTargetTaskId, getTaskId, setActions, setNodes, setParentTaskId, setTargetParentTaskId, setTargetTaskId, setTaskId, setTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
DOCS
public static final org.elasticsearch.xcontent.ParseField DOCS -
TIMEOUT
public static final org.elasticsearch.xcontent.ParseField TIMEOUT -
DEFAULT_TIMEOUT
public static final org.elasticsearch.core.TimeValue DEFAULT_TIMEOUT
-
-
Constructor Details
-
Request
- Throws:
IOException
-
-
Method Details
-
forDocs
public static InferTrainedModelDeploymentAction.Request forDocs(String id, InferenceConfigUpdate update, List<Map<String, Object>> docs, org.elasticsearch.core.TimeValue inferenceTimeout) -
forTextInput
public static InferTrainedModelDeploymentAction.Request forTextInput(String id, InferenceConfigUpdate update, List<String> textInput, org.elasticsearch.core.TimeValue inferenceTimeout) -
getId
-
getDocs
-
getTextInput
-
getUpdate
-
getInferenceTimeout
public org.elasticsearch.core.TimeValue getInferenceTimeout() -
setId
-
getTimeout
@Nullable public org.elasticsearch.core.TimeValue getTimeout()This is always null as we want the inference call to handle the timeout, not the tasks framework- Overrides:
getTimeoutin classBaseTasksRequest<InferTrainedModelDeploymentAction.Request>- Returns:
- null
-
setHighPriority
public void setHighPriority(boolean highPriority) -
isHighPriority
public boolean isHighPriority() -
setPrefixType
-
getPrefixType
-
isChunkResults
public boolean isChunkResults() -
setChunkResults
public void setChunkResults(boolean chunkResults) -
validate
- Overrides:
validatein classBaseTasksRequest<InferTrainedModelDeploymentAction.Request>
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseTasksRequest<InferTrainedModelDeploymentAction.Request>- Throws:
IOException
-
match
- Overrides:
matchin classBaseTasksRequest<InferTrainedModelDeploymentAction.Request>
-
equals
-
hashCode
public int hashCode() -
createTask
-