|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.washington.cs.pl_if.rpc.server.RpcServerFunctionsImpl
public class RpcServerFunctionsImpl
Field Summary |
---|
Constructor Summary | |
---|---|
RpcServerFunctionsImpl()
|
Method Summary | |
---|---|
int |
addHostsToSlice(Map auth,
Object[] hosts)
|
int |
addRandomHostsFromPLC(Map auth,
int numberOfHosts)
Requests "numberOfHosts" random hosts from PLC and tries to connect to them. |
int |
addRandomSitesFromPLC(Map auth,
int numberOfSites)
Requests "numberOfSites" random sites from PLC and tries to connect to one random host in each site . |
double |
commandCompleted(Map auth,
int commandId)
Returns what percentage of hosts that has completed command "commandId" |
int |
connectToHost(Map credentials,
String hostname)
Request the controller to connect to host hostname. |
int |
download(Map auth,
String remotePath,
String localPath,
String fileFilter,
String localNamingType)
|
int |
fetchCoMonData(Map auth)
|
Object[] |
getAllHosts(Map auth)
|
Object[] |
getAvailableHosts(Map auth)
|
String |
getCommand(Map auth,
int commandIndex)
return the command associated with a certain commmandId |
Object[] |
getCommandOverview(Map auth,
int commandId)
|
Object[] |
getCommandStats(Map auth,
int connectionId)
|
Object[] |
getCommandStatusOverview(Map auth)
used by the gui to get a summary of the status of each command |
double |
getCoMonProgress(Map auth)
|
Object[] |
getConnectedHosts(Map auth)
Queries the controller for the list of nodes currently connected to Lazy wrapper for PlanetLab.getSuccessfulHosts(auth,0) |
Map |
getExitStats(Map auth,
int commandId)
returns a map of exitcode=>count |
String |
getHostname(Map auth,
int hostnum)
returns the hostname given a connectionId |
Object[] |
getHostsNotInSlice(Map auth)
|
Object[] |
getHostStats(Map auth,
Object[] hosts)
|
Object[] |
getHostStatusOverview(Map auth)
used by the gui to get a summary of the status of each host |
Object[] |
getSuccessfulHosts(Map auth,
int commandId)
Queries the controller for a list of all nodes that succesfully have completed all commands. |
int |
kill(Map auth,
int commandId)
|
int |
queueCommand(Map credentials,
String command)
lazy wrapper for queueCommand(Map auth, String command, 0, false), Running "command" with no timeout and continuing with subsequent commands even if the command returns a non non-zero exit code |
int |
queueCommand(Map credentials,
String command,
double timeout)
lazy wrapper for queueCommand(Map auth, String command, double timeout, false), Running the command until it completes, or gets killed because the timeout expired. |
int |
queueCommand(Map credentials,
String command,
double timeout,
boolean stopOnError)
Add the command "command" to the queue of command to execute Running the command until it completes, or gets killed because the timeout expired. |
int |
queueCommand(Map credentials,
String command,
double timeout,
int stopOnError)
|
int |
queueCommand(Map credentials,
String command,
int timeout)
lazy wrapper for queueCommand(Map auth, String command, double timeout, false), Running the command until it completes, or gets killed because the timeout expired. |
Object[] |
readConsole(Map auth,
int connectionId,
int fromRow)
Reads the consle from ssh connection, |
int |
shutdown(Map auth)
stops the RPC Server and closes all current ssh connections, including any running scp transfers |
int |
totalCommandNum(Map auth)
returns the total number of commands that have been queued on the controller |
int |
totalHostNum(Map auth)
returns the total number of hosts assisated with the system |
int |
upload(Map auth,
String path,
double timeout,
boolean stopOnError)
Uploads a local file or directory to all hosts The upload is implemented as follows: First a md5 checksum is calculated of the file or on all files in the specified directory and subdirectories Secondly md5s are calculated on the destination to check if the file(s) already exists. |
int |
upload(Map auth,
String path,
double timeout,
int stopOnError)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RpcServerFunctionsImpl()
Method Detail |
---|
public int addRandomHostsFromPLC(Map auth, int numberOfHosts)
RpcFunctions
addRandomHostsFromPLC
in interface RpcFunctions
auth
- authentication information that is matching the information on
the server. The values checked are Username and AuthString.
These can be provided in clear text or as md5 hashes. If md5
hashes are used, the Username field should contain the md5
hash of the username string, the AuthString field should
contain the md5 hash of the username string concatenated with
the password string. The use of md5 hashes makes it difficult
for an attacker to get the password by monitoring the network.
Keep in mind that the password can be extracted from the md5
hashes by an attacker by using a dictonary.numberOfHosts
- number of hosts to request
public int addRandomSitesFromPLC(Map auth, int numberOfSites)
RpcFunctions
addRandomSitesFromPLC
in interface RpcFunctions
auth
- authentication information that is matching the information on
the servernumberOfSites
- number of sites to request
public double commandCompleted(Map auth, int commandId)
RpcFunctions
commandCompleted
in interface RpcFunctions
auth
- authentication information that is matching the information on
the servercommandId
- the id of the command to query
public int connectToHost(Map credentials, String hostname)
RpcFunctions
connectToHost
in interface RpcFunctions
credentials
- authentication information that is matching the information on
the serverhostname
- hostname or ip address to connect to
public String getCommand(Map auth, int commandIndex)
RpcFunctions
getCommand
in interface RpcFunctions
auth
- authentication information that is matching the information on
the server
public Object[] getCommandOverview(Map auth, int commandId)
getCommandOverview
in interface RpcFunctions
public Object[] getCommandStats(Map auth, int connectionId)
getCommandStats
in interface RpcFunctions
public Object[] getCommandStatusOverview(Map auth)
RpcFunctions
getCommandStatusOverview
in interface RpcFunctions
public Object[] getConnectedHosts(Map auth)
RpcFunctions
getConnectedHosts
in interface RpcFunctions
auth
- authentication
public Map getExitStats(Map auth, int commandId)
RpcFunctions
getExitStats
in interface RpcFunctions
auth
- authentication information that is matching the information on
the servercommandId
- the id of the command to query
public String getHostname(Map auth, int hostnum)
RpcFunctions
getHostname
in interface RpcFunctions
auth
- authentication information that is matching the information on
the serverhostnum
- the connectionId of the host to get the hostname of
public Object[] getHostStatusOverview(Map auth)
RpcFunctions
getHostStatusOverview
in interface RpcFunctions
public Object[] getSuccessfulHosts(Map auth, int commandId)
RpcFunctions
getSuccessfulHosts
in interface RpcFunctions
auth
- authentication infocommandId
- the command that must have completed succesfully, or -1 for
all commands
public int kill(Map auth, int commandId)
kill
in interface RpcFunctions
public int queueCommand(Map credentials, String command)
RpcFunctions
queueCommand
in interface RpcFunctions
credentials
- authentication information that is matching the information on
the servercommand
- the command to queue
public int queueCommand(Map credentials, String command, double timeout)
RpcFunctions
queueCommand
in interface RpcFunctions
credentials
- authentication information that is matching the information on
the servercommand
- the command to queuetimeout
- the maximum number of seconds (or fractions of a second) the
command can run, after this the command will get killed
public int queueCommand(Map credentials, String command, double timeout, boolean stopOnError)
RpcFunctions
queueCommand
in interface RpcFunctions
credentials
- authentication information that is matching the information on
the servercommand
- the command to queuetimeout
- the maximum number of seconds (or fractions of a second) the
command can run, after this the command will get killedstopOnError
- controller if execution of commands should stop if the
commands exit with a non-zero exit code. If stop on error is
enabled execution is halted until the user override.
public int queueCommand(Map credentials, String command, double timeout, int stopOnError)
queueCommand
in interface RpcFunctions
public int queueCommand(Map credentials, String command, int timeout)
RpcFunctions
queueCommand
in interface RpcFunctions
credentials
- authentication information that is matching the information on
the servercommand
- the command to queuetimeout
- the maximum number of seconds the command can run, after this
the command will get killed
public Object[] readConsole(Map auth, int connectionId, int fromRow)
RpcFunctions
readConsole
in interface RpcFunctions
auth
- authentication information that is matching the information on
the serverconnectionId
- The connection ID of the host to read the console offromRow
- Row to start reading from, useful when only new information is
interesting, like for example in a terminal like window
public int shutdown(Map auth)
RpcFunctions
shutdown
in interface RpcFunctions
auth
- authentication information that is matching the information on
the server
public int totalCommandNum(Map auth)
RpcFunctions
totalCommandNum
in interface RpcFunctions
auth
- authentication information that is matching the information on
the server
public int totalHostNum(Map auth)
RpcFunctions
totalHostNum
in interface RpcFunctions
auth
- authentication information that is matching the information on
the server
public int upload(Map auth, String path, double timeout, boolean stopOnError)
RpcFunctions
upload
in interface RpcFunctions
auth
- authentication information that is matching the information on
the serverpath
- the local directory to uploadtimeout
- maximum time allowed for the uploadstopOnError
- stop exection on command if the upload was unsuccessful
public int upload(Map auth, String path, double timeout, int stopOnError)
upload
in interface RpcFunctions
public int download(Map auth, String remotePath, String localPath, String fileFilter, String localNamingType)
download
in interface RpcFunctions
public int addHostsToSlice(Map auth, Object[] hosts)
addHostsToSlice
in interface RpcFunctions
public Object[] getHostsNotInSlice(Map auth)
getHostsNotInSlice
in interface RpcFunctions
public int fetchCoMonData(Map auth)
fetchCoMonData
in interface RpcFunctions
public double getCoMonProgress(Map auth)
getCoMonProgress
in interface RpcFunctions
public Object[] getHostStats(Map auth, Object[] hosts)
getHostStats
in interface RpcFunctions
public Object[] getAllHosts(Map auth)
getAllHosts
in interface RpcFunctions
public Object[] getAvailableHosts(Map auth)
getAvailableHosts
in interface RpcFunctions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |