Groovy Documentation
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

A

addTag(null) - Method in Agent
Adds a tag.
addTags(null) - Method in Agent
Adds all the tags.
Agent - Interface in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
AgentException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
AgentException(null) - Constructor in AgentException
ant(null) - Method in Shell
Exporting ant access to the shell to run any ant command.

B


C

cancel(def) - Method in Timers
@param args.timer timer
cat(def) - Method in Shell
Returns the content of the location as a String or null if the location is not reachable
chmod(def, def) - Method in Shell
Changes the permission of the file
chmodPlusX(def) - Method in Shell
Shortcut/More efficient implementation of the more generic chmod(Object, Object) call
chmodRecursive(def, def) - Method in Shell
Changes the permission of the dir and recursively
clearError(def) - Method in Agent
Clears the error attached to the mountpoint.
cp(def, def) - Method in Shell
Copy from to to...
create(null) - Method in MountPoint
create(null) - Method in ScriptExecutionCauseException
createTempDir(def) - Method in Shell
Create a temporary directory

D

demultiplexExecStream(null, null, null) - Method in Shell
Demultiplexes the exec stream as generated by exec(Map) when args.res is stream.
deserializeFromFile(def) - Method in Shell
Reads the content of the file and deserializes it (java serialization).
DuplicateMountPointException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
DuplicateMountPointException(null) - Constructor in DuplicateMountPointException

E

eachChildRecurse(def, def) - Method in Shell
Every child resource of this resource (recursively) is being passed to the closure.
equals(def) - Method in MountPoint
equals(def) - Method in ScriptExecutionException
exec(null) - Method in Shell
More generic form of the exec call which allows you to configure what you provide and what you expect.
executeAction(def) - Method in Agent
Executes the action on the software that was installed on the given mount point.
executeActionAndWait(def) - Method in Agent
Shortcut for both actions.
executeActionAndWaitForState(def) - Method in Agent
Shortcut for both actions.
executeCall(def) - Method in Agent
Executes the call on the software that was installed on the given mount point.
executeShellCommand(def) - Method in Agent
**************************************************************** Commands *****************************************************************

F

fail(def) - Method in Shell
Calling this method will force a script failure (will throw an exception)
fetch(def, def) - Method in Shell
Fetches the file pointed to by the location.
findAll(def, def) - Method in Shell
Every child resource of this resource (recursively) is being passed to the closure.
forceChangeState(def, def) - Method in StateManager
This method is used to change the state and should be used carefully.
fromPath(null) - Method in MountPoint
Reverse of getPath()
fromPathWithNoSlash(null) - Method in MountPoint
Reverse of toPathWithNoSlash
FutureExecution - Interface in org.linkedin.glu.agent.api
@author ypujante@linkedin.com

G

get(def) - Method in FutureExecution
Convenient call which allow a timeout of different types (long, String, Timespan...)
getChildren() - Method in GluScript
@return the children of this glu script
getCompletionTime() - Method in FutureExecution
when the execution completes
getEnv() - Method in Shell
@return all the environment properties exposed by the glu agent (most are coming from its configuration, others are computed (like glu.agent.pid which is the pid of the agent).
getFileContent(def) - Method in Agent
Returns the content of the file at the given location.
getFullState(def) - Method in Agent
@param args.mountPoint the mount point of the script you want to get the (full) state
getFullState() - Method in StateManager
@return a map with the following definition:
 [
   scriptDefinition: [ mountPoint: x,
                       parent: x,
                       scriptFactory: x,
                       initParameters: x ], // all values provided when installing the glu script
    scriptState: [
                   script: [x:x], // all serializable variables in the glu script
                   stateMachine: getState(),
                   timers: [[timer: x, repeatFrequency: x], ...]
                 ]
 ]
 
getFutureExecutionTime() - Method in FutureExecution
when the execution should start (0 means start now)
getHostInfo() - Method in Agent
**************************************************************** Agent calls *****************************************************************
getId() - Method in FutureExecution
Unique id of the execution
getId() - Method in GluCommand
@return the (unique) id of the command
getLog() - Method in GluCommand
@return a logger to log information (in the agent log file)
getLog() - Method in GluScript
@return a logger to log information (in the agent log file)
getMimeTypes(def) - Method in Shell
Try to guess the mime types of a given file
getMountPoint() - Method in GluScript
Returns:
the mountPoint on which the script was installed.
getMountPoints() - Method in Agent
@return a list of all mount points currently mounted in the agent
getName() - Method in MountPoint
getParams() - Method in GluScript
@return the initParameters provided at installation time
getParent() - Method in GluScript
@return the parent of this glu script (null when root script)
getParent() - Method in MountPoint
getPath() - Method in MountPoint
Returns as a path (starting with '/')
getPathElements() - Method in MountPoint
Returns as a collection of path elements (first one is always the empty string)
getRoot() - Method in Shell
the root of the file system used by this shell.
getRootShell() - Method in GluScript
The shell returned by this call is set to the root of the filesystem (/) and should be used with caution!
getSelf() - Method in GluCommand
@return a reference to 'this' script
getSelf() - Method in GluScript
@return a reference to 'this' script
getShell() - Method in GluCommand
@return the shell for (unix) shell like capabilities
getShell() - Method in GluScript
The shell returned by this call is relative to where apps are installed.
getStartTime() - Method in FutureExecution
when the execution started
getState(def) - Method in Agent
@param args.mountPoint the mount point of the script you want to get the state
getState() - Method in GluScript
Shortcut to getStateManager().state
getState() - Method in StateManager
@return the state of the script (from a state machine point of view) (see info org.linkedin.glu.util.state.StateMachine#getState())
getStateManager() - Method in GluScript
@return the state manager to be able to get information about the state
getStringError() - Method in ShellExecException
getStringOutput() - Method in ShellExecException
getTags() - Method in Agent
@return the set of all tags
getTagsCount() - Method in Agent
**************************************************************** Tags *****************************************************************
getTimers() - Method in GluScript
@return the timers object allows you to schedule and cancel timers
getTmpRoot() - Method in Shell
the tmp root of the file system used by this shell.
GluCommand - Interface in org.linkedin.glu.agent.api
All glu command will at runtime implement this interface.
GluScript - Interface in org.linkedin.glu.agent.api
All glu script will at runtime implement this interface.
grep(def, def, def) - Method in Shell
Similarly to the unix grep command, checks the location one line at a time and returns all the lines which matches the pattern
gunzip(def, def) - Method in Shell
Gunzips the provided file in the provided location
gzip(def, def) - Method in Shell
Compresses the provided file as toFile
gzipFileOrFolder(def, boolean) - Method in Shell
Compresses each file in a folder

H

hasAllTags(null) - Method in Agent
@return true if the given tags are present (all of them)
hasAnyTag(null) - Method in Agent
@return true if at least one of them is present
hashCode() - Method in MountPoint
hashCode() - Method in ScriptExecutionException
hasTag(null) - Method in Agent
@return true if the given tag is present
hasTags() - Method in Agent
@return true if there are no tags
httpHead(def) - Method in Shell
Issue a 'HEAD' request.
httpPost(def, null) - Method in Shell
Issue a 'POST' request.

I

initCause(null) - Method in ScriptExecutionCauseException
installScript(def) - Method in Agent
**************************************************************** Script management *****************************************************************
interruptAction(def) - Method in Agent
Interrupts the action provided or the current one if neither action nor actionId is provided.
interruptCommand(def) - Method in Agent
Interrupts the command.

J


K

kill(long, int) - Method in Agent
Sends the signal to the process with the given pid

L

listening(def, def) - Method in Shell
@return true if there is a socket open on the server/port combination
ls(null) - Method in Shell
Same as the other ls, but starts at root

M

mkdirs(def) - Method in Shell
Create the directory as well as its parents if they don't exist
MountPoint - Class in org.linkedin.glu.agent.api
Represents a mount point
MountPoint(def) - Constructor in MountPoint
Constructor
mv(def, def) - Method in Shell
Move from to to...

N

noException(null) - Method in Shell
Runs the closure in a protected block that will not throw an exception but will return null in the case one happens
NoSuchActionException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
NoSuchActionException(null) - Constructor in NoSuchActionException
NoSuchCommandException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
NoSuchCommandException(null) - Constructor in NoSuchCommandException
NoSuchMountPointException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
NoSuchMountPointException(null) - Constructor in NoSuchMountPointException

O


P

ps() - Method in Agent
Equivalent to the ps command on unix: returns information about all the processes running

Q


R

readContent(def) - Method in Shell
reads the content from the file and return it as a String
removeTag(null) - Method in Agent
Removes the provided tag.
removeTags(null) - Method in Agent
Removes all the tags.
replaceTokens(def, def, null) - Method in Shell
Processes from through the replacement token mechanism and writes the result to to
rm(def) - Method in Shell
Delete the file
rmdirs(def) - Method in Shell
Delete the directory (recursive)
rmEmptyDirs(def) - Method in Shell
Remove all empty directories (that are children (recursively) of the provided directory).
ROOT - Field in MountPoint

S

safeOverwrite(def, null) - Method in Shell
This convenient call takes a file you want to (over)write to and a closure.
saveContent(def, null, null) - Method in Shell
Processes the content to the token replacement method.
schedule(def) - Method in Timers
Schedule a timer.
ScriptException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
ScriptException(def, def) - Constructor in ScriptException
ScriptExecutionCauseException - Class in org.linkedin.glu.agent.api
The purpose of this class is to make sure that the exception is always serializable which unfortunately is not always the case.
ScriptExecutionCauseException(null) - Constructor in ScriptExecutionCauseException
ScriptExecutionException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
ScriptExecutionException(null) - Constructor in ScriptExecutionException
ScriptFailedException - Class in org.linkedin.glu.agent.api
@author ypujante@linkedin.com
ScriptFailedException(null, null) - Constructor in ScriptFailedException
ScriptIllegalStateException - Class in org.linkedin.glu.agent.api
Thrown when a script is in illegal state
ScriptIllegalStateException(def, def) - Constructor in ScriptIllegalStateException
serializeToFile(def, def) - Method in Shell
Serializes (java serialization!)
setTags(null) - Method in Agent
Allow you to set the exact set of tags you want.
Shell - Interface in org.linkedin.glu.agent.api
Contains shell related methods.
ShellExecException - Class in org.linkedin.glu.agent.api
@author yan@pongasoft.com
ShellExecException(def, def) - Constructor in ShellExecException
StateManager - Interface in org.linkedin.glu.agent.api
This interface is available from any GLU script using stateManager property
streamCommandResults(def) - Method in Agent
This method allows you to start streaming the results (stdout, stderr,...) while the command is still running.
sync() - Method in Agent
Resynchronizes the agent (to call in case the agent loose synchronization with zookeeper for example)

T

tail(def) - Method in Shell
Tail the file
tailAgentLog(def) - Method in Agent
tails the agent log file
tempFile() - Method in Shell
Creates a temp file with all default values
TimeOutException - Class in org.linkedin.glu.agent.api
Thrown when time out
TimeOutException(null) - Constructor in TimeOutException
Timers - Interface in org.linkedin.glu.agent.api
This interface is available from any GLU script using timers property
toPathWithNoSlash() - Method in MountPoint
Returns:
the path with all slashes replaced with '_' and of course the '_' sign properly encoded.
toResource(def) - Method in Shell
Returns a resource relative to this filesystem.
toString() - Method in MountPoint

U

uninstallScript(def) - Method in Agent
Removed a previously installed script.
untar(def, def) - Method in Shell
Untars the provided file in the provided location.
untarAndDecrypt(def, def, def) - Method in Shell
untar + decrypt using the encryption keys (encrytion keys are automatically provided by glu and are available in any glu script with args.encriptionKeys)
unzip(def, def) - Method in Shell
Unzips the provided file in the provided location

V


W

waitFor(null) - Method in Shell
Shortcut when no args
waitForAction(def) - Method in Agent
Waits for the action (previously scheduled in executeAction(Object)) to complete no longer than the timeout provided.
waitForCommand(def) - Method in Agent
Wait (no longer than the timeout provided) for the command to complete and return the exit value
waitForShutdownState() - Method in StateManager
This method waits for the script to be in shutdown state: the script is put in shutdown state when the agent shutdowns.
waitForState(def) - Method in Agent
Waits for the script to be in the state
withInputStream(def, def) - Method in Shell
Safe pattern to read from a file: you provide the file and the closure gets called back with an java.io.InputStream object as an argument so you don't have to worry about closing it.
withMBeanServerConnection(def, null) - Method in Shell
Invokes the closure with an MBeanServerConnection to the jmx control running on the vm started with the provided pid.
withObjectInputStream(def, def) - Method in Shell
Safe pattern to read from a file: you provide the file and the closure gets called back with an java.io.ObjectInputStream object as an argument so you don't have to worry about closing it.
withObjectOutputStream(def, def) - Method in Shell
Safe pattern to write to a file: you provide the file and the closure gets called back with an java.io.ObjectOutputStream object as an argument so you don't have to worry about closing it.
withOutputStream(def, def) - Method in Shell
Safe pattern to write to a file: you provide the file and the closure gets called back with an java.io.OutputStream object as an argument so you don't have to worry about closing it.
withReader(def, null) - Method in Shell
Same as withInputStream but wraps in a reader using a configured charset (defaults to UTF-8).
withWriter(def, null) - Method in Shell
Same as withOutputStream but wraps in a writer using a configured charset (defaults to UTF-8).

X


Y


Z


_


Groovy Documentation