Class NodeAdminImpl

java.lang.Object
com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl
All Implemented Interfaces:
NodeAdmin

public class NodeAdminImpl extends Object implements NodeAdmin
Administers a host (for now only docker hosts) and its nodes (docker containers nodes).
Author:
stiankri
  • Constructor Details

  • Method Details

    • refreshContainersToRun

      public void refreshContainersToRun(Set<NodeAgentContext> nodeAgentContexts)
      Description copied from interface: NodeAdmin
      Start/stop NodeAgents and schedule next NodeAgent ticks with the given NodeAgentContexts
      Specified by:
      refreshContainersToRun in interface NodeAdmin
    • updateMetrics

      public void updateMetrics(boolean isSuspended)
      Description copied from interface: NodeAdmin
      Update node admin metrics
      Specified by:
      updateMetrics in interface NodeAdmin
    • setFrozen

      public boolean setFrozen(boolean wantFrozen)
      Description copied from interface: NodeAdmin
      Attempts to freeze/unfreeze all NodeAgents and itself. To freeze a NodeAgent means that they will not pick up any changes from NodeRepository.
      Specified by:
      setFrozen in interface NodeAdmin
      Parameters:
      wantFrozen - whether NodeAgents and NodeAdmin should be frozen
      Returns:
      True if all the NodeAgents and NodeAdmin has converged to the desired state
    • isFrozen

      public boolean isFrozen()
      Description copied from interface: NodeAdmin
      Returns whether NodeAdmin itself is currently frozen, meaning it will not pick up any changes from NodeRepository.
      Specified by:
      isFrozen in interface NodeAdmin
    • subsystemFreezeDuration

      public Duration subsystemFreezeDuration()
      Description copied from interface: NodeAdmin
      Returns an upper bound on the time some or all parts of the node admin (including agents) have been frozen. Returns 0 if not frozen, nor trying to freeze.
      Specified by:
      subsystemFreezeDuration in interface NodeAdmin
    • stopNodeAgentServices

      public void stopNodeAgentServices()
      Description copied from interface: NodeAdmin
      Stop all services on these nodes
      Specified by:
      stopNodeAgentServices in interface NodeAdmin
    • start

      public void start()
      Description copied from interface: NodeAdmin
      Start node-admin schedulers.
      Specified by:
      start in interface NodeAdmin
    • stop

      public void stop()
      Description copied from interface: NodeAdmin
      Stop the NodeAgents. Will not delete the storage or stop the container.
      Specified by:
      stop in interface NodeAdmin