|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.process.AbstractUniversalProcess
org.objectweb.proactive.core.process.AbstractExternalProcess
org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
org.objectweb.proactive.core.process.oar.OARSubProcess
The OARSubProcess class is able to start any class, of the ProActive library, on a cluster managed by OAR protocol. An istance of this class can be coupled for instance with RLoginProcess or SSHProcess classes in order to log into the cluster's front end with rlogin or ssh and then to run a job with OARSubProcess.
For instance:
.............. OARSubProcess oar = new OARSubProcess(new SimpleExternalProcess("ls -lsa")); SSHProcess ssh = new RLoginProcess(oar, false); ssh.setHostname("cluster_front_end_name"); ssh.startProcess(); ...............Anyway it is strongly advised to use XML Deployment files to run such processes
Nested Class Summary | |
class |
OARSubProcess.ParserMessageLogger
Implementation of a MessageLogger that look for the jobID of the launched job |
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator |
AbstractExternalProcessDecorator.CompositeMessageLogger, AbstractExternalProcessDecorator.CompositeMessageSink |
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
AbstractExternalProcess.NullMessageLogger, AbstractExternalProcess.ProcessInputHandler, AbstractExternalProcess.ProcessOutputHandler, AbstractExternalProcess.SimpleMessageSink, AbstractExternalProcess.StandardOutputMessageLogger |
Field Summary | |
protected java.lang.String |
bookingDuration
|
protected static java.lang.String |
DEFAULT_BOOKING_DURATION
|
protected static java.lang.String |
DEFAULT_HOSTS_NUMBER
|
static java.lang.String |
DEFAULT_OARSUBPATH
|
protected java.lang.String |
hostList
|
protected java.lang.String |
hostNumber
|
protected java.lang.String |
interactive
|
protected int |
jobID
|
protected java.lang.String |
outputFile
|
protected java.lang.String |
queueName
|
protected java.lang.String |
scriptLocation
|
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator |
targetProcess |
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
clogger, errorMessageLogger, externalProcess, inputMessageLogger, IS_WINDOWS_SYSTEM, outputMessageSink |
Fields inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
certificateLocation, command, command_path, DEFAULT_HOSTNAME, DEFAULT_USERNAME, environment, hostname, isFinished, isStarted, LOCALHOST, privateKeyLocation, securityFile, username |
Fields inherited from interface org.objectweb.proactive.core.process.ExternalProcessDecorator |
APPEND_TO_COMMAND_COMPOSITION, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION |
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
logger |
Constructor Summary | |
OARSubProcess()
|
|
OARSubProcess(ExternalProcess targetProcess)
|
Method Summary | |
protected java.lang.String |
buildCommand()
oarsub is not able to receive env variables or parameters for a script we thus rely on the following trick, the command has the form echo "real command" | qsub -I ... |
protected java.lang.StringBuffer |
buildResourceString()
|
java.lang.String |
getHostList()
Returns the hostList value of this process. |
java.lang.String |
getHostsNumber()
Returns the number of nodes requested when running the job |
protected java.lang.String |
internalBuildCommand()
|
protected void |
internalStartProcess(java.lang.String commandToExecute)
|
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
parseHostname(java.lang.String message)
|
void |
setBookingDuration(java.lang.String d)
Set the booking duration of the cluster's nodes. |
void |
setErrorMessageLogger(MessageLogger errorMessageLogger)
sets the MessageLogger handling the error stream of the process |
void |
setHostList(java.lang.String hostList)
Sets the value of the hostList parameter with the given value Not yet included in the oar command |
void |
setHostsNumber(java.lang.String hosts)
Sets the number of nodes requested when running the job |
void |
setInteractive(java.lang.String interactive)
Allows to launch this OARSubProcess with -I (interactive option) Not yet included in the oar command |
void |
setOutputFile(java.lang.String string)
Set the output file to be passed to oar Not yet included in the oar command |
void |
setOutputMessageSink(MessageSink outputMessageSink)
sets the MessageSink handling the output stream of the process |
void |
setQueueName(java.lang.String queueName)
Sets the value of the queue where the job will be launched. |
void |
setScriptLocation(java.lang.String location)
Sets the location of the script on the remote host |
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator |
getCompositionType, getTargetProcess, handleOutput, setCompositionType, setTargetProcess, toString |
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalStopProcess, internalWaitFor, setInputMessageLogger |
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
checkStarted, getCertificateLocation, getCommand, getCommandPath, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, setCommandPath, setEnvironment, setHostname, setPrivateKeyLocation, setSecurityFile, setUsername, startProcess, stopProcess, toString, waitFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.process.ExternalProcess |
getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, setInputMessageLogger |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getCertificateLocation, getCommand, getCommandPath, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, setCommandPath, setEnvironment, setHostname, setPrivateKeyLocation, setSecurityFile, setUsername, startProcess, stopProcess, waitFor |
Field Detail |
public static final java.lang.String DEFAULT_OARSUBPATH
protected static final java.lang.String DEFAULT_HOSTS_NUMBER
protected static final java.lang.String DEFAULT_BOOKING_DURATION
protected java.lang.String hostNumber
protected java.lang.String scriptLocation
protected java.lang.String bookingDuration
protected java.lang.String interactive
protected java.lang.String outputFile
protected int jobID
protected java.lang.String queueName
protected java.lang.String hostList
Constructor Detail |
public OARSubProcess()
public OARSubProcess(ExternalProcess targetProcess)
Method Detail |
public void setErrorMessageLogger(MessageLogger errorMessageLogger)
ExternalProcess
setErrorMessageLogger
in interface ExternalProcess
setErrorMessageLogger
in class AbstractExternalProcess
public void setOutputMessageSink(MessageSink outputMessageSink)
ExternalProcess
setOutputMessageSink
in interface ExternalProcess
setOutputMessageSink
in class AbstractExternalProcess
public java.lang.String getHostsNumber()
public void setHostsNumber(java.lang.String hosts)
hosts
- public void setScriptLocation(java.lang.String location)
location
- public void setBookingDuration(java.lang.String d)
d
- durationpublic void setHostList(java.lang.String hostList)
hostList
- public java.lang.String getHostList()
public void setInteractive(java.lang.String interactive)
interactive
- true for -I option false otherwisepublic void setOutputFile(java.lang.String string)
string
- public void setQueueName(java.lang.String queueName)
queueName
- protected java.lang.String parseHostname(java.lang.String message)
protected java.lang.String internalBuildCommand()
internalBuildCommand
in class AbstractExternalProcessDecorator
protected void internalStartProcess(java.lang.String commandToExecute) throws java.io.IOException
internalStartProcess
in class AbstractExternalProcessDecorator
java.io.IOException
protected java.lang.String buildCommand()
buildCommand
in class AbstractExternalProcessDecorator
protected java.lang.StringBuffer buildResourceString()
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |