Class Node


  • public class Node
    extends java.lang.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. Use builder() or builder(Node) to create instances of this.
    Author:
    mpolden, jonmv
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> additionalHostnames()
      Additional hostnames available on this, usable by child nodes
      java.util.Set<java.lang.String> additionalIpAddresses()
      Additional IP addresses available on this, usable by child nodes
      static Node.Builder builder()  
      static Node.Builder builder​(Node node)  
      java.lang.String clusterId()
      The cluster ID of this, empty string if unallocated
      Node.ClusterType clusterType()
      The cluster type of this
      int cost()
      A number representing the cost of this
      com.yahoo.config.provision.DockerImage currentDockerImage()
      The container image of this is currently running
      java.util.Optional<java.time.Instant> currentFirmwareCheck()
      The last time this checked for a firmware update
      com.yahoo.component.Version currentOsVersion()
      The OS version this is currently running
      com.yahoo.component.Version currentVersion()
      The Vespa version this is currently running
      Node.Environment environment()
      The environment this runs in
      boolean equals​(java.lang.Object o)  
      java.util.Optional<com.yahoo.config.provision.ApplicationId> exclusiveTo()
      The application this has been provisioned exclusively for, if any
      int failCount()
      How many times this has failed
      java.util.Optional<java.lang.String> flavor()
      The flavor of this
      java.lang.String group()
      The group of this node, empty string if unallocated
      int hashCode()  
      java.util.List<Node.Event> history()
      History of events affecting this
      com.yahoo.config.provision.HostName hostname()
      The hostname of this
      java.lang.String id()
      The cloud provider's unique ID for this
      java.util.Set<java.lang.String> ipAddresses()
      IP addresses of this
      java.util.Optional<java.lang.String> modelName()
      The server model of this, if any
      java.util.Optional<com.yahoo.config.provision.ApplicationId> owner()
      The application owning this, if any
      java.util.Optional<com.yahoo.config.provision.HostName> parentHostname()
      The parent hostname of this, if any
      long rebootGeneration()
      The current reboot generation
      java.util.Map<java.lang.String,​java.lang.String> reports()
      Returns the reports of this node.
      java.util.Optional<com.yahoo.config.provision.TenantName> reservedTo()
      The tenant this has been reserved to, if any
      com.yahoo.config.provision.NodeResources resources()
      Resources, such as CPU and memory, of this
      long restartGeneration()
      The current restart generation
      boolean retired()
      Whether this is retired
      Node.ServiceState serviceState()
      The current service state of this
      Node.State state()
      Current state of this
      java.util.Optional<java.time.Instant> suspendedSince()
      The most recent time this suspended, if any
      java.util.Optional<java.lang.String> switchHostname()
      Hostname of the switch this is connected to, if any
      com.yahoo.config.provision.NodeType type()
      The node type of this
      com.yahoo.config.provision.DockerImage wantedDockerImage()
      The wanted Docker image
      java.util.Optional<java.time.Instant> wantedFirmwareCheck()
      The wanted time this should check for a firmware update
      com.yahoo.component.Version wantedOsVersion()
      The wanted OS version
      long wantedRebootGeneration()
      The wanted reboot generation
      long wantedRestartGeneration()
      The wanted restart generation
      com.yahoo.component.Version wantedVersion()
      The wanted Vespa version
      boolean wantToDeprovision()
      Whether this node has been requested to deprovision
      boolean wantToRebuild()
      Whether this node has been requested to rebuild
      boolean wantToRetire()
      Whether this node has been requested to retire
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • id

        public java.lang.String id()
        The cloud provider's unique ID for this
      • hostname

        public com.yahoo.config.provision.HostName hostname()
        The hostname of this
      • parentHostname

        public java.util.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 java.util.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 java.util.Optional<java.time.Instant> currentFirmwareCheck()
        The last time this checked for a firmware update
      • wantedFirmwareCheck

        public java.util.Optional<java.time.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 java.util.Optional<java.time.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
      • flavor

        public java.util.Optional<java.lang.String> flavor()
        The flavor of this
      • clusterId

        public java.lang.String clusterId()
        The cluster ID of this, empty string if unallocated
      • retired

        public boolean retired()
        Whether this is retired
      • group

        public java.lang.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 java.util.Optional<com.yahoo.config.provision.TenantName> reservedTo()
        The tenant this has been reserved to, if any
      • exclusiveTo

        public java.util.Optional<com.yahoo.config.provision.ApplicationId> exclusiveTo()
        The application this has been provisioned exclusively for, if any
      • reports

        public java.util.Map<java.lang.String,​java.lang.String> reports()
        Returns the reports of this node. Key is the report ID. Value is untyped, but is typically a JSON string
      • history

        public java.util.List<Node.Event> history()
        History of events affecting this
      • ipAddresses

        public java.util.Set<java.lang.String> ipAddresses()
        IP addresses of this
      • additionalIpAddresses

        public java.util.Set<java.lang.String> additionalIpAddresses()
        Additional IP addresses available on this, usable by child nodes
      • additionalHostnames

        public java.util.Set<java.lang.String> additionalHostnames()
        Additional hostnames available on this, usable by child nodes
      • switchHostname

        public java.util.Optional<java.lang.String> switchHostname()
        Hostname of the switch this is connected to, if any
      • modelName

        public java.util.Optional<java.lang.String> modelName()
        The server model of this, if any
      • environment

        public Node.Environment environment()
        The environment this runs in
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object