Groovy Documentation

org.linkedin.glu.orchestration.engine.agents
[Groovy] Interface AgentsService


interface AgentsService

Authors:
ypujante


Method Summary
boolean clearAgentInfo(Fabric fabric, java.lang.String agentName)

Clears the agent info for the given agent

java.lang.Object clearError(java.lang.Object args)

java.lang.Object executeShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)

Executes the shell command.

java.lang.Object forceUninstallScript(java.lang.Object args)

AgentInfo getAgentInfo(Fabric fabric, java.lang.String agentName)

java.util.Map getAgentInfos(Fabric fabric)

java.lang.Object getAllInfosWithAccuracy(Fabric fabric)

SystemModel getCurrentSystemModel(Fabric fabric)

Builds the current system model based on the live data from ZooKeeper

java.lang.Object getFullState(java.lang.Object args)

MountPointInfo getMountPointInfo(Fabric fabric, java.lang.String agentName, java.lang.Object mountPoint)

java.util.Map getMountPointInfos(Fabric fabric, java.lang.String agentName)

java.lang.Object interruptAction(java.lang.Object args)

boolean interruptCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)

Interrupts the command.

java.lang.Object kill(java.lang.Object args)

java.lang.Object ps(java.lang.Object args)

java.lang.Object streamCommandResults(Fabric fabric, java.lang.String agentName, java.lang.Object args, groovy.lang.Closure commandResultProcessor)

Streams the results from the command.

void streamFileContent(java.lang.Object args, groovy.lang.Closure closure)

java.lang.Object sync(java.lang.Object args)

void tailLog(java.lang.Object args, groovy.lang.Closure closure)

java.lang.Object uninstallScript(java.lang.Object args)

java.lang.Object waitForCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)

Wait (no longer than the timeout provided) for the command to complete and return the exit value

boolean waitForCommandNoTimeOutException(Fabric fabric, java.lang.String agentName, java.lang.Object args)

Wait (no longer than the timeout provided) for the command to complete and return the exit value

boolean waitForState(java.lang.String fabric, java.lang.String agentName, java.lang.Object mountPoint, java.lang.String state, java.lang.Object timeout)

boolean waitForState(Fabric fabric, java.lang.String agentName, java.lang.Object mountPoint, java.lang.String state, java.lang.Object timeout)

 

Method Detail

clearAgentInfo

boolean clearAgentInfo(Fabric fabric, java.lang.String agentName)
Clears the agent info for the given agent
throws:
IllegalStateException when the agent is still up!
Returns:
true if the agent was cleared, false if it was already cleared


clearError

java.lang.Object clearError(java.lang.Object args)


executeShellCommand

java.lang.Object executeShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)
Executes the shell command. Note that this call is non blocking.
Returns:
whatever org.linkedin.glu.agent.api.Agent#executeShellCommand returns
See Also:
org.linkedin.glu.agent.api.Agent#executeShellCommand


forceUninstallScript

java.lang.Object forceUninstallScript(java.lang.Object args)


getAgentInfo

AgentInfo getAgentInfo(Fabric fabric, java.lang.String agentName)


getAgentInfos

java.util.Map getAgentInfos(Fabric fabric)


getAllInfosWithAccuracy

java.lang.Object getAllInfosWithAccuracy(Fabric fabric)


getCurrentSystemModel

SystemModel getCurrentSystemModel(Fabric fabric)
Builds the current system model based on the live data from ZooKeeper


getFullState

java.lang.Object getFullState(java.lang.Object args)


getMountPointInfo

MountPointInfo getMountPointInfo(Fabric fabric, java.lang.String agentName, java.lang.Object mountPoint)


getMountPointInfos

java.util.Map getMountPointInfos(Fabric fabric, java.lang.String agentName)


interruptAction

java.lang.Object interruptAction(java.lang.Object args)


interruptCommand

boolean interruptCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)
Interrupts the command.
Parameters:
args.id - the id of the command to interrupt
Returns:
true if the command was interrupted properly or false if there was no such command or already completed


kill

java.lang.Object kill(java.lang.Object args)


ps

java.lang.Object ps(java.lang.Object args)


streamCommandResults

java.lang.Object streamCommandResults(Fabric fabric, java.lang.String agentName, java.lang.Object args, groovy.lang.Closure commandResultProcessor)
Streams the results from the command.
Parameters:
commandResultProcessor - a closure which takes the output of org.linkedin.glu.agent.api.Agent#streamCommandResults
Returns:
whatever the closure returns
See Also:
org.linkedin.glu.agent.api.Agent#streamCommandResults


streamFileContent

void streamFileContent(java.lang.Object args, groovy.lang.Closure closure)


sync

java.lang.Object sync(java.lang.Object args)


tailLog

void tailLog(java.lang.Object args, groovy.lang.Closure closure)


uninstallScript

java.lang.Object uninstallScript(java.lang.Object args)


waitForCommand

java.lang.Object waitForCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)
Wait (no longer than the timeout provided) for the command to complete and return the exit value
Parameters:
args.id - the id of the command (as returned by {@lin #executeShellCommand})
args.timeout - if not null, the amount of time to wait maximum. If null, wait until the command completes.
Returns:
the exit value


waitForCommandNoTimeOutException

boolean waitForCommandNoTimeOutException(Fabric fabric, java.lang.String agentName, java.lang.Object args)
Wait (no longer than the timeout provided) for the command to complete and return the exit value
Parameters:
args.id - the id of the command (as returned by {@lin #executeShellCommand})
args.timeout - if not null, the amount of time to wait maximum. If null, wait until the command completes.
Returns:
true if the command completed within the timeout or false otherwise


waitForState

boolean waitForState(java.lang.String fabric, java.lang.String agentName, java.lang.Object mountPoint, java.lang.String state, java.lang.Object timeout)


waitForState

boolean waitForState(Fabric fabric, java.lang.String agentName, java.lang.Object mountPoint, java.lang.String state, java.lang.Object timeout)


 

Groovy Documentation