Package org.opensearch.ml.common
Class MLTask
java.lang.Object
org.opensearch.ml.common.MLTask
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
public class MLTask
extends Object
implements org.opensearch.core.xcontent.ToXContentObject, org.opensearch.core.common.io.stream.Writeable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionMLTask(String taskId, String modelId, MLTaskType taskType, FunctionName functionName, MLTaskState state, MLInputDataType inputType, Float progress, String outputIndex, List<String> workerNodes, Instant createTime, Instant lastUpdateTime, String error, org.opensearch.commons.authuser.User user, boolean async) MLTask(org.opensearch.core.common.io.stream.StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionstatic MLTask.MLTaskBuilderbuilder()protected booleanbooleanstatic MLTaskfromStream(org.opensearch.core.common.io.stream.StreamInput in) getError()getState()org.opensearch.commons.authuser.UsergetUser()inthashCode()booleanisAsync()static MLTaskparse(org.opensearch.core.xcontent.XContentParser parser) voidvoidsetFunctionName(FunctionName functionName) voidsetModelId(String modelId) voidsetState(MLTaskState state) voidvoidsetWorkerNodes(List<String> workerNodes) org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder xContentBuilder, org.opensearch.core.xcontent.ToXContent.Params params) voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
TASK_ID_FIELD
- See Also:
-
MODEL_ID_FIELD
- See Also:
-
TASK_TYPE_FIELD
- See Also:
-
FUNCTION_NAME_FIELD
- See Also:
-
STATE_FIELD
- See Also:
-
INPUT_TYPE_FIELD
- See Also:
-
PROGRESS_FIELD
- See Also:
-
OUTPUT_INDEX_FIELD
- See Also:
-
WORKER_NODE_FIELD
- See Also:
-
CREATE_TIME_FIELD
- See Also:
-
LAST_UPDATE_TIME_FIELD
- See Also:
-
ERROR_FIELD
- See Also:
-
IS_ASYNC_TASK_FIELD
- See Also:
-
-
Constructor Details
-
MLTask
public MLTask(String taskId, String modelId, MLTaskType taskType, FunctionName functionName, MLTaskState state, MLInputDataType inputType, Float progress, String outputIndex, List<String> workerNodes, Instant createTime, Instant lastUpdateTime, String error, org.opensearch.commons.authuser.User user, boolean async) -
MLTask
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder xContentBuilder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-
fromStream
public static MLTask fromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
parse
- Throws:
IOException
-
builder
-
toBuilder
-
getTaskId
-
getModelId
-
getTaskType
-
getFunctionName
-
getState
-
getInputType
-
getProgress
-
getOutputIndex
-
getWorkerNodes
-
getCreateTime
-
getLastUpdateTime
-
getError
-
getUser
public org.opensearch.commons.authuser.User getUser() -
isAsync
public boolean isAsync() -
equals
-
canEqual
-
hashCode
public int hashCode() -
setTaskId
-
setModelId
-
setFunctionName
-
setState
-
setWorkerNodes
-
setError
-