Class NodeAdminImpl
java.lang.Object
com.yahoo.vespa.hosted.node.admin.nodeadmin.NodeAdminImpl
- All Implemented Interfaces:
NodeAdmin
Administers a host (for now only docker hosts) and its nodes (docker containers nodes).
- Author:
- stiankri
-
Constructor Summary
ConstructorsConstructorDescriptionNodeAdminImpl(NodeAgentFactory nodeAgentFactory, Metrics metrics, Clock clock, FileSystem fileSystem) NodeAdminImpl(NodeAgentFactory nodeAgentFactory, Metrics metrics, Clock clock, Duration freezeTimeout, Duration spread, ProcMeminfoReader procMeminfoReader) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisFrozen()Returns whether NodeAdmin itself is currently frozen, meaning it will not pick up any changes from NodeRepository.voidrefreshContainersToRun(Set<NodeAgentContext> nodeAgentContexts) Start/stop NodeAgents and schedule next NodeAgent ticks with the given NodeAgentContextsbooleansetFrozen(boolean wantFrozen) Attempts to freeze/unfreeze all NodeAgents and itself.voidstart()Start node-admin schedulers.voidstop()Stop the NodeAgents.voidStop all services on these nodesReturns an upper bound on the time some or all parts of the node admin (including agents) have been frozen.voidupdateMetrics(boolean isSuspended) Update node admin metrics
-
Constructor Details
-
NodeAdminImpl
public NodeAdminImpl(NodeAgentFactory nodeAgentFactory, Metrics metrics, Clock clock, FileSystem fileSystem) -
NodeAdminImpl
public NodeAdminImpl(NodeAgentFactory nodeAgentFactory, Metrics metrics, Clock clock, Duration freezeTimeout, Duration spread, ProcMeminfoReader procMeminfoReader)
-
-
Method Details
-
refreshContainersToRun
Description copied from interface:NodeAdminStart/stop NodeAgents and schedule next NodeAgent ticks with the given NodeAgentContexts- Specified by:
refreshContainersToRunin interfaceNodeAdmin
-
updateMetrics
public void updateMetrics(boolean isSuspended) Description copied from interface:NodeAdminUpdate node admin metrics- Specified by:
updateMetricsin interfaceNodeAdmin
-
setFrozen
public boolean setFrozen(boolean wantFrozen) Description copied from interface:NodeAdminAttempts to freeze/unfreeze all NodeAgents and itself. To freeze a NodeAgent means that they will not pick up any changes from NodeRepository. -
isFrozen
public boolean isFrozen()Description copied from interface:NodeAdminReturns whether NodeAdmin itself is currently frozen, meaning it will not pick up any changes from NodeRepository. -
subsystemFreezeDuration
Description copied from interface:NodeAdminReturns 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:
subsystemFreezeDurationin interfaceNodeAdmin
-
stopNodeAgentServices
public void stopNodeAgentServices()Description copied from interface:NodeAdminStop all services on these nodes- Specified by:
stopNodeAgentServicesin interfaceNodeAdmin
-
start
public void start()Description copied from interface:NodeAdminStart node-admin schedulers. -
stop
public void stop()Description copied from interface:NodeAdminStop the NodeAgents. Will not delete the storage or stop the container.
-