Package com.yahoo.vdslib.state
Class NodeState
java.lang.Object
com.yahoo.vdslib.state.NodeState
- All Implemented Interfaces:
Cloneable
The state of a single node in the cluster state
TODO: The config aspects of this should move to ConfiguredNode
TODO: The type should be removed, as it is part of the owner.
TODO: Monitoring aspects should move to NodeInfo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanA state can not be forced to be in a state above its reported state.clone()static NodeStatedeserialize(NodeType type, String serialized) Creates an instance from the serialized form produced by serializebooleandoubledoublestatic floatintlonggetState()getTextualDifference(NodeState other) booleaninthashCode()serialize(boolean verbose) serialize(int nodeIdx, boolean verbose) setCapacity(float c) Capacity is set by deserializing a node state.setDescription(String desc) setInitProgress(float p) setMinUsedBits(int u) setStartTimestamp(long ts) booleanStates are similar if the cluster state doesn't need to be updated due to a change.booleantoString()toString(boolean compact) void
-
Field Details
-
ORCHESTRATOR_RESERVED_DESCRIPTION
- See Also:
-
-
Constructor Details
-
NodeState
-
-
Method Details
-
getListingBucketsInitProgressLimit
public static float getListingBucketsInitProgressLimit() -
clone
-
above
A state can not be forced to be in a state above its reported state. For instance, a node being down cannot be forced to up, but a node being down can be forced to maintenance. -
equals
-
hashCode
public int hashCode() -
similarTo
States are similar if the cluster state doesn't need to be updated due to a change. Note that min dist bits may need to alter cluster state, but as we don't know at this point, we ignore it. Cluster state will check for that. -
similarToIgnoringInitProgress
-
getDiff
-
getTextualDifference
-
setCapacity
Capacity is set by deserializing a node state. This seems odd, as it is config -
setInitProgress
-
setDescription
-
setMinUsedBits
-
setState
-
setStartTimestamp
-
getCapacity
public double getCapacity() -
getInitProgress
public double getInitProgress() -
hasDescription
public boolean hasDescription() -
getDescription
-
getState
-
getMinUsedBits
public int getMinUsedBits() -
getStartTimestamp
public long getStartTimestamp() -
toString
-
toString
-
serialize
-
serialize
-
serialize
-
deserialize
Creates an instance from the serialized form produced by serialize- Throws:
ParseException
-
verifyValidInSystemState
-