Module org.elasticsearch.server
Record Class BalancingRoundSummary
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary
- Record Components:
nodeNameToWeightChanges- The shard balance weight changes for each node (by name), comparing a previous DesiredBalance shard allocation to a new DesiredBalance allocation.numberOfShardsToMove- The number of shard moves required to move from the previous desired balance to the new one. Does not include new (index creation) or removed (index deletion) shard assignements.
public record BalancingRoundSummary(Map<String,org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary.NodesWeightsChanges> nodeNameToWeightChanges, long numberOfShardsToMove)
extends Record
Summarizes the impact to the cluster as a result of a rebalancing round.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHolds combinedBalancingRoundSummaryresults. -
Constructor Summary
ConstructorsConstructorDescriptionBalancingRoundSummary(Map<String, org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary.NodesWeightsChanges> nodeNameToWeightChanges, long numberOfShardsToMove) Creates an instance of aBalancingRoundSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Map<String, org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary.NodesWeightsChanges> Returns the value of thenodeNameToWeightChangesrecord component.longReturns the value of thenumberOfShardsToMoverecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
BalancingRoundSummary
public BalancingRoundSummary(Map<String, org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary.NodesWeightsChanges> nodeNameToWeightChanges, long numberOfShardsToMove) Creates an instance of aBalancingRoundSummaryrecord class.- Parameters:
nodeNameToWeightChanges- the value for thenodeNameToWeightChangesrecord componentnumberOfShardsToMove- the value for thenumberOfShardsToMoverecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
nodeNameToWeightChanges
public Map<String,org.elasticsearch.cluster.routing.allocation.allocator.BalancingRoundSummary.NodesWeightsChanges> nodeNameToWeightChanges()Returns the value of thenodeNameToWeightChangesrecord component.- Returns:
- the value of the
nodeNameToWeightChangesrecord component
-
numberOfShardsToMove
public long numberOfShardsToMove()Returns the value of thenumberOfShardsToMoverecord component.- Returns:
- the value of the
numberOfShardsToMoverecord component
-