Module org.elasticsearch.xcore
Class RoutingInfo
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.assignment.RoutingInfo
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
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
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionRoutingInfo(int currentAllocations, int targetAllocations, RoutingState state, String reason) RoutingInfo defines the state of a particular trained model assignment on a particular node. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RoutingInfofromXContent(org.elasticsearch.xcontent.XContentParser parser) intintgetState()intinthashCode()booleanbooleantoString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
RoutingInfo
public RoutingInfo(int currentAllocations, int targetAllocations, RoutingState state, String reason) RoutingInfo defines the state of a particular trained model assignment on a particular node.- Parameters:
currentAllocations- The number of allocations currently running on a node.targetAllocations- The number of allocations that have been assigned to a node, and will run on the node. Should never be higher than the number of available processors on the node.state- Indicates the availability of the allocations on the node.reason- Will contain the reason that currentAllocations != targetAllocations, if applicable, otherwise empty string.
-
RoutingInfo
- Throws:
IOException
-
-
Method Details
-
fromXContent
-
getCurrentAllocations
public int getCurrentAllocations()- Returns:
- The number of allocations currently running on a node.
-
getTargetAllocations
public int getTargetAllocations()- Returns:
- The number of allocations that have been assigned to a node, and will run on the node. Should never be higher than the number of available processors on the node.
-
getFailedAllocations
public int getFailedAllocations() -
getState
-
getReason
-
isOutdated
public boolean isOutdated() -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
isRoutable
public boolean isRoutable()
-