Module org.elasticsearch.xcore
Class TrainedModelAssignment
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.assignment.TrainedModelAssignment
- All Implemented Interfaces:
Diffable<TrainedModelAssignment>,SimpleDiffable<TrainedModelAssignment>,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public final class TrainedModelAssignment
extends Object
implements SimpleDiffable<TrainedModelAssignment>, org.elasticsearch.xcontent.ToXContentObject
Trained model assignment object that contains assignment options and the assignment routing table
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested 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.xcontent.ParseFieldFields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TrainedModelAssignmentfromXContent(org.elasticsearch.xcontent.XContentParser parser) intString[]inthashCode()booleanbooleanbooleanisRoutedToNode(String nodeId) booleanisSatisfied(Set<String> assignableNodeIds) selectRandomNodesWeighedOnAllocations(int numberOfRequests, RoutingState... acceptableStates) intintintintorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static booleanuseNewMemoryFields(TransportVersion minClusterVersion) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
ADAPTIVE_ALLOCATIONS
public static final org.elasticsearch.xcontent.ParseField ADAPTIVE_ALLOCATIONS
-
-
Constructor Details
-
TrainedModelAssignment
- Throws:
IOException
-
-
Method Details
-
useNewMemoryFields
-
fromXContent
public static TrainedModelAssignment fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
isRoutedToNode
-
getNodeRoutingTable
- Returns:
- shows where allocations for this assignment/deployment are located (on which nodes)
-
getModelId
-
getDeploymentId
-
getTaskParams
-
getAssignmentState
-
getStartedNodes
-
hasStartedRoutes
public boolean hasStartedRoutes() -
selectRandomNodesWeighedOnAllocations
public List<org.elasticsearch.core.Tuple<String,Integer>> selectRandomNodesWeighedOnAllocations(int numberOfRequests, RoutingState... acceptableStates) -
getReason
-
getStartTime
-
getMaxAssignedAllocations
public int getMaxAssignedAllocations() -
getAdaptiveAllocationsSettings
-
isSatisfied
-
hasOutdatedRoutingEntries
public boolean hasOutdatedRoutingEntries() -
totalCurrentAllocations
public int totalCurrentAllocations() -
totalTargetAllocations
public int totalTargetAllocations() -
totalTargetProcessors
public int totalTargetProcessors() -
totalFailedAllocations
public int totalFailedAllocations() -
equals
-
hashCode
public int hashCode() -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
calculateAllocationStatus
-