Class Node
- java.lang.Object
-
- com.yahoo.vespa.hosted.controller.api.integration.configserver.Node
-
public class Node extends Object
A node in hosted Vespa. This is immutable and all fields are guaranteed to be non-null. This should never leak any wire format types or types from third-party libraries. Usebuilder()orbuilder(Node)to create instances of this.- Author:
- mpolden, jonmv
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNode.BuilderBuilder for aNode.static classNode.ClusterTypeKnown cluster types.static classNode.EnvironmentKnown nope environmentsstatic classNode.EventA node eventstatic classNode.ServiceStateKnown node states with regards to service orchestrationstatic classNode.StateKnown node states
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>additionalHostnames()Additional hostnames available on this, usable by child nodesSet<String>additionalIpAddresses()Additional IP addresses available on this, usable by child nodesstatic Node.Builderbuilder()static Node.Builderbuilder(Node node)StringclusterId()The cluster ID of this, empty string if unallocatedNode.ClusterTypeclusterType()The cluster type of thisintcost()A number representing the cost of thiscom.yahoo.config.provision.DockerImagecurrentDockerImage()The container image of this is currently runningOptional<Instant>currentFirmwareCheck()The last time this checked for a firmware updatecom.yahoo.component.VersioncurrentOsVersion()The OS version this is currently runningcom.yahoo.component.VersioncurrentVersion()The Vespa version this is currently runningNode.Environmentenvironment()The environment this runs inbooleanequals(Object o)Optional<com.yahoo.config.provision.ApplicationId>exclusiveTo()The application this has been provisioned exclusively for, if anyintfailCount()How many times this has failedOptional<String>flavor()The flavor of thisStringgroup()The group of this node, empty string if unallocatedinthashCode()List<Node.Event>history()History of events affecting thiscom.yahoo.config.provision.HostNamehostname()The hostname of thisStringid()The cloud provider's unique ID for thisSet<String>ipAddresses()IP addresses of thisOptional<String>modelName()The server model of this, if anyOptional<com.yahoo.config.provision.ApplicationId>owner()The application owning this, if anyOptional<com.yahoo.config.provision.HostName>parentHostname()The parent hostname of this, if anylongrebootGeneration()The current reboot generationMap<String,String>reports()Returns the reports of this node.Optional<com.yahoo.config.provision.TenantName>reservedTo()The tenant this has been reserved to, if anycom.yahoo.config.provision.NodeResourcesresources()Resources, such as CPU and memory, of thislongrestartGeneration()The current restart generationbooleanretired()Whether this is retiredNode.ServiceStateserviceState()The current service state of thisNode.Statestate()Current state of thisOptional<Instant>suspendedSince()The most recent time this suspended, if anyOptional<String>switchHostname()Hostname of the switch this is connected to, if anycom.yahoo.config.provision.NodeTypetype()The node type of thiscom.yahoo.config.provision.DockerImagewantedDockerImage()The wanted Docker imageOptional<Instant>wantedFirmwareCheck()The wanted time this should check for a firmware updatecom.yahoo.component.VersionwantedOsVersion()The wanted OS versionlongwantedRebootGeneration()The wanted reboot generationlongwantedRestartGeneration()The wanted restart generationcom.yahoo.component.VersionwantedVersion()The wanted Vespa versionbooleanwantToDeprovision()Whether this node has been requested to deprovisionbooleanwantToRebuild()Whether this node has been requested to rebuildbooleanwantToRetire()Whether this node has been requested to retire
-
-
-
Method Detail
-
id
public String id()
The cloud provider's unique ID for this
-
hostname
public com.yahoo.config.provision.HostName hostname()
The hostname of this
-
parentHostname
public Optional<com.yahoo.config.provision.HostName> parentHostname()
The parent hostname of this, if any
-
state
public Node.State state()
Current state of this
-
type
public com.yahoo.config.provision.NodeType type()
The node type of this
-
resources
public com.yahoo.config.provision.NodeResources resources()
Resources, such as CPU and memory, of this
-
owner
public Optional<com.yahoo.config.provision.ApplicationId> owner()
The application owning this, if any
-
currentVersion
public com.yahoo.component.Version currentVersion()
The Vespa version this is currently running
-
wantedVersion
public com.yahoo.component.Version wantedVersion()
The wanted Vespa version
-
currentOsVersion
public com.yahoo.component.Version currentOsVersion()
The OS version this is currently running
-
wantedOsVersion
public com.yahoo.component.Version wantedOsVersion()
The wanted OS version
-
currentDockerImage
public com.yahoo.config.provision.DockerImage currentDockerImage()
The container image of this is currently running
-
wantedDockerImage
public com.yahoo.config.provision.DockerImage wantedDockerImage()
The wanted Docker image
-
currentFirmwareCheck
public Optional<Instant> currentFirmwareCheck()
The last time this checked for a firmware update
-
wantedFirmwareCheck
public Optional<Instant> wantedFirmwareCheck()
The wanted time this should check for a firmware update
-
serviceState
public Node.ServiceState serviceState()
The current service state of this
-
suspendedSince
public Optional<Instant> suspendedSince()
The most recent time this suspended, if any
-
restartGeneration
public long restartGeneration()
The current restart generation
-
wantedRestartGeneration
public long wantedRestartGeneration()
The wanted restart generation
-
rebootGeneration
public long rebootGeneration()
The current reboot generation
-
wantedRebootGeneration
public long wantedRebootGeneration()
The wanted reboot generation
-
cost
public int cost()
A number representing the cost of this
-
failCount
public int failCount()
How many times this has failed
-
clusterId
public String clusterId()
The cluster ID of this, empty string if unallocated
-
clusterType
public Node.ClusterType clusterType()
The cluster type of this
-
retired
public boolean retired()
Whether this is retired
-
group
public String group()
The group of this node, empty string if unallocated
-
wantToRetire
public boolean wantToRetire()
Whether this node has been requested to retire
-
wantToDeprovision
public boolean wantToDeprovision()
Whether this node has been requested to deprovision
-
wantToRebuild
public boolean wantToRebuild()
Whether this node has been requested to rebuild
-
reservedTo
public Optional<com.yahoo.config.provision.TenantName> reservedTo()
The tenant this has been reserved to, if any
-
exclusiveTo
public Optional<com.yahoo.config.provision.ApplicationId> exclusiveTo()
The application this has been provisioned exclusively for, if any
-
reports
public Map<String,String> reports()
Returns the reports of this node. Key is the report ID. Value is untyped, but is typically a JSON string
-
history
public List<Node.Event> history()
History of events affecting this
-
additionalIpAddresses
public Set<String> additionalIpAddresses()
Additional IP addresses available on this, usable by child nodes
-
additionalHostnames
public Set<String> additionalHostnames()
Additional hostnames available on this, usable by child nodes
-
switchHostname
public Optional<String> switchHostname()
Hostname of the switch this is connected to, if any
-
environment
public Node.Environment environment()
The environment this runs in
-
builder
public static Node.Builder builder()
-
builder
public static Node.Builder builder(Node node)
-
-