|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.process.AbstractUniversalProcess | +--org.objectweb.proactive.core.process.AbstractExternalProcess | +--org.objectweb.proactive.core.process.AbstractExternalProcessDecorator | +--org.objectweb.proactive.core.process.lsf.LSFBSubProcess
The LSFBSubProcess class is able to start any class, of the ProActive library, on a cluster managed by LSF prtocol. An istance of this class can be coupled for instance with RlLoginProcess or SSHProcess classes in order to log into the cluster's front end with rlogin or ssh and then to run a job with LSFBSubProcess.
For instance:
.............. LSFBSubProcess lsf = new LSFBSubProcess(new SimpleExternalProcess("ls -lsa")); RLoginProcess p = new RLoginProcess(lsf, false); p.setHostname("cluster_front_end_name"); p.startProcess(); ...............
Nested Class Summary | |
class |
LSFBSubProcess.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 | |
static java.lang.String |
DEFAULT_BJOBPATH
|
static java.lang.String |
DEFAULT_BSUBPATH
|
static java.lang.String |
DEFAULT_LSFPATH
|
protected static java.lang.String |
DEFAULT_PROCESSOR_NUMBER
|
static java.lang.String |
DEFAULT_QUEUE_NAME
|
protected java.lang.String |
hostList
|
protected java.lang.String |
interactive
|
protected int |
jobID
|
protected java.lang.String |
processor
|
protected java.lang.String |
queueName
|
protected java.lang.String |
res_requirement
|
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, 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 | |
LSFBSubProcess()
Creates a new LSFBsubProcess Used with XML Descriptors |
|
LSFBSubProcess(ExternalProcess targetProcess)
Creates a new LSFBsubProcess |
Method Summary | |
protected java.lang.String |
buildBJobsCommand()
|
static ExternalProcess |
buildBKillProcess(int jobID)
Builds bkill command and encapsulates it in a process |
protected java.lang.String |
buildBSubCommand()
|
java.lang.String |
getHostList()
Returns the hostList value of this process. |
int |
getJobID()
Returns the id of the job associated to this process |
java.lang.String |
getProcessorNumber()
Returns the number of processor requested for the job |
java.lang.String |
getQueueName()
Returns the name of the queue where the job was launched |
java.lang.String |
getRes_requirement()
|
java.lang.String |
getScriptLocation()
|
protected java.lang.String |
internalBuildCommand()
|
java.lang.String |
isInteractive()
Returns true if this BsubProcess is lauched with -I option false otherwise |
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
parseHostname(java.lang.String message)
parses the hostname from a string. |
protected int |
parseJobID(java.lang.String message)
parses a message in order to find the job id of the launched job. |
protected void |
sendJobDetailsCommand()
|
void |
setHostList(java.lang.String hostList)
Sets the value of the hostList parameter with the given value |
void |
setInputMessageLogger(MessageLogger inputMessageLogger)
sets the MessageLogger handling the input stream of the process |
void |
setInteractive(java.lang.String interactive)
Allows to launch this BsubProcess with -I (interactive option) |
void |
setOutputMessageSink(MessageSink outputMessageSink)
sets the MessageSink handling the output stream of the process |
void |
setProcessorNumber(java.lang.String processor)
Sets the number of processor requested when running the job |
void |
setQueueName(java.lang.String queueName)
Sets the value of the queue where the job will be launched. |
void |
setRes_requirement(java.lang.String res_requirement)
|
void |
setScriptLocation(java.lang.String location)
|
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator |
buildCommand, getCompositionType, getTargetProcess, handleOutput, internalStartProcess, setCompositionType, setTargetProcess, toString |
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalStopProcess, internalWaitFor, setErrorMessageLogger |
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
checkStarted, getCertificateLocation, getCommand, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, 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, setErrorMessageLogger |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getCertificateLocation, getCommand, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, setEnvironment, setHostname, setPrivateKeyLocation, setSecurityFile, setUsername, startProcess, stopProcess, waitFor |
Field Detail |
public static final java.lang.String DEFAULT_LSFPATH
public static final java.lang.String DEFAULT_BSUBPATH
public static final java.lang.String DEFAULT_BJOBPATH
public static final java.lang.String DEFAULT_QUEUE_NAME
protected static final java.lang.String DEFAULT_PROCESSOR_NUMBER
protected int jobID
protected java.lang.String queueName
protected java.lang.String hostList
protected java.lang.String scriptLocation
protected java.lang.String processor
protected java.lang.String interactive
protected java.lang.String res_requirement
Constructor Detail |
public LSFBSubProcess()
public LSFBSubProcess(ExternalProcess targetProcess)
targetProcess
- The target process associated to this process. The target process
represents the process that will be launched with the bsub commandMethod Detail |
public void setInputMessageLogger(MessageLogger inputMessageLogger)
ExternalProcess
setInputMessageLogger
in interface ExternalProcess
setInputMessageLogger
in class AbstractExternalProcess
inputMessageLogger
- the handler of the input stream of the processpublic void setOutputMessageSink(MessageSink outputMessageSink)
ExternalProcess
setOutputMessageSink
in interface ExternalProcess
setOutputMessageSink
in class AbstractExternalProcess
outputMessageSink
- the handler of the output stream of the processpublic static ExternalProcess buildBKillProcess(int jobID)
jobID
- The id of the job previously launched
public static void main(java.lang.String[] args)
public int getJobID()
public java.lang.String getQueueName()
public void setQueueName(java.lang.String queueName)
queueName
- public void setHostList(java.lang.String hostList)
hostList
- public java.lang.String getHostList()
public java.lang.String isInteractive()
public void setInteractive(java.lang.String interactive)
interactive
- true for -I option false otherwisepublic void setProcessorNumber(java.lang.String processor)
processor
- public java.lang.String getProcessorNumber()
public void setScriptLocation(java.lang.String location)
public java.lang.String getScriptLocation()
public java.lang.String getRes_requirement()
public void setRes_requirement(java.lang.String res_requirement)
protected java.lang.String internalBuildCommand()
internalBuildCommand
in class AbstractExternalProcessDecorator
protected java.lang.String buildBSubCommand()
protected java.lang.String buildBJobsCommand()
protected int parseJobID(java.lang.String message)
protected java.lang.String parseHostname(java.lang.String message)
message
- the string that may contains the hostname
protected void sendJobDetailsCommand()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |