org.objectweb.proactive.core.process.gridengine
Class GridEngineSubProcess

java.lang.Object
  extended byorg.objectweb.proactive.core.process.AbstractUniversalProcess
      extended byorg.objectweb.proactive.core.process.AbstractExternalProcess
          extended byorg.objectweb.proactive.core.process.AbstractExternalProcessDecorator
              extended byorg.objectweb.proactive.core.process.gridengine.GridEngineSubProcess
All Implemented Interfaces:
ExternalProcess, ExternalProcessDecorator, java.io.Serializable, UniversalProcess

public class GridEngineSubProcess
extends AbstractExternalProcessDecorator

The GridEngineSubProcess class is able to start any class, of the ProActive library, on a cluster managed by Sun Grid Engine 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 LSFBSubProcess.

For instance:

 ..............
 GridEngineSubProcess sge = new GridEngineSubProcess(new SimpleExternalProcess("ls -lsa"));
 SSHProcess ssh = new RLoginProcess(sge, false);
 ssh.setHostname("cluster_front_end_name");
 ssh.startProcess();
 ...............
 
Anyway it is strongly advised to use XML Deployment files to run such processes

Since:
ProActive 2.0.1
Version:
1.0, 2004/09/20
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
 class GridEngineSubProcess.ParserMessageLogger
          Implementation of a RemoteProcessMessageLogger 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
           
protected static java.lang.String DEFAULT_PARALLEL_ENVIRONMENT
           
static java.lang.String DEFAULT_QSUBPATH
           
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 parallelEnvironment
           
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, closeStream, errorMessageLogger, externalProcess, FILE_TRANSFER_DEFAULT_PROTOCOL, fileTransferLogger, inputMessageLogger, IS_WINDOWS_SYSTEM, NO_COMPOSITION, 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, COPY_FILE_AND_APPEND_COMMAND, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION
 
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess
logger, UNKNOWN_NODE_NUMBER
 
Constructor Summary
GridEngineSubProcess()
           
GridEngineSubProcess(ExternalProcess targetProcess)
           
 
Method Summary
protected  java.lang.String buildCommand()
           
protected  java.lang.StringBuffer buildResourceString()
           
 UniversalProcess getFinalProcess()
          Returns the last process of the chain
 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
 int getNodeNumber()
          Returns the number of nodes targeted
 java.lang.String getParallelEnvironment()
          Returns the parallel environmemnt for this GridEngineSubProcess
 java.lang.String getProcessId()
          Returns the id of the process
protected  java.lang.String internalBuildCommand()
           
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(RemoteProcessMessageLogger errorMessageLogger)
          sets the RemoteProcessMessageLogger 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 sge command
 void setHostsNumber(java.lang.String hostNumber)
          Sets the number of nodes requested when running the job
 void setInteractive(java.lang.String interactive)
          Allows to launch this GridEngineSubProcess with -I (interactive option) Not yet included in the sge command
 void setOutputFile(java.lang.String string)
          Set the output file to be passed to sge Not yet included in the sge command
 void setOutputMessageSink(MessageSink outputMessageSink)
          sets the MessageSink handling the output stream of the process
 void setParallelEnvironment(java.lang.String p)
          Sets the parallel environmemnt for this GridEngineSubProcess
 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, handleCopyFile, handleOutput, internalStartProcess, setCompositionType, setTargetProcess, toString
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, closeStream, getErrorMessageLogger, getFileTransferDefaultCopyProtocol, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalFileTransferDefaultProtocol, internalStartFileTransfer, internalStopProcess, internalWaitFor, setInputMessageLogger
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess
checkStarted, getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, pushProcessAttributes, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, 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
closeStream, getErrorMessageLogger, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, setInputMessageLogger
 
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess
getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, waitFor
 

Field Detail

DEFAULT_QSUBPATH

public static final java.lang.String DEFAULT_QSUBPATH
See Also:
Constant Field Values

DEFAULT_HOSTS_NUMBER

protected static final java.lang.String DEFAULT_HOSTS_NUMBER
See Also:
Constant Field Values

DEFAULT_PARALLEL_ENVIRONMENT

protected static final java.lang.String DEFAULT_PARALLEL_ENVIRONMENT
See Also:
Constant Field Values

DEFAULT_BOOKING_DURATION

protected static final java.lang.String DEFAULT_BOOKING_DURATION
See Also:
Constant Field Values

hostNumber

protected java.lang.String hostNumber

parallelEnvironment

protected java.lang.String parallelEnvironment

bookingDuration

protected java.lang.String bookingDuration

scriptLocation

protected java.lang.String scriptLocation

interactive

protected java.lang.String interactive

outputFile

protected java.lang.String outputFile

jobID

protected int jobID

queueName

protected java.lang.String queueName

hostList

protected java.lang.String hostList
Constructor Detail

GridEngineSubProcess

public GridEngineSubProcess()

GridEngineSubProcess

public GridEngineSubProcess(ExternalProcess targetProcess)
Method Detail

setErrorMessageLogger

public void setErrorMessageLogger(RemoteProcessMessageLogger errorMessageLogger)
Description copied from interface: ExternalProcess
sets the RemoteProcessMessageLogger handling the error stream of the process

Specified by:
setErrorMessageLogger in interface ExternalProcess
Overrides:
setErrorMessageLogger in class AbstractExternalProcess

setOutputMessageSink

public void setOutputMessageSink(MessageSink outputMessageSink)
Description copied from interface: ExternalProcess
sets the MessageSink handling the output stream of the process

Specified by:
setOutputMessageSink in interface ExternalProcess
Overrides:
setOutputMessageSink in class AbstractExternalProcess

setBookingDuration

public void setBookingDuration(java.lang.String d)
Set the booking duration of the cluster's nodes. The default is 00:01:00

Parameters:
d - duration

getHostsNumber

public java.lang.String getHostsNumber()
Returns the number of nodes requested when running the job

Returns:
the number of nodes requested when running the job

setHostsNumber

public void setHostsNumber(java.lang.String hostNumber)
Sets the number of nodes requested when running the job

Parameters:
hostNumber - the number of nodes requested when running the job

getProcessId

public java.lang.String getProcessId()
Description copied from interface: UniversalProcess
Returns the id of the process

Returns:
the id of the process. This id is just the first letters of the process class, to be able to identify the sequence of processes used
See Also:
UniversalProcess.getProcessId()

getNodeNumber

public int getNodeNumber()
Description copied from interface: UniversalProcess
Returns the number of nodes targeted

Returns:
the number of nodes targeted. Represents the number of nodes expected to use when starting this process. If this number cannot be known, waiting for all available nodes for example, UNKNOWN_NODE_NUMBER is returned.
See Also:
UniversalProcess.getNodeNumber()

getFinalProcess

public UniversalProcess getFinalProcess()
Description copied from interface: UniversalProcess
Returns the last process of the chain

Returns:
the last process of the chain
See Also:
UniversalProcess.getFinalProcess()

setScriptLocation

public void setScriptLocation(java.lang.String location)
Sets the location of the script on the remote host

Parameters:
location -

setParallelEnvironment

public void setParallelEnvironment(java.lang.String p)
Sets the parallel environmemnt for this GridEngineSubProcess

Parameters:
p - the parallel environmemnt to use

getParallelEnvironment

public java.lang.String getParallelEnvironment()
Returns the parallel environmemnt for this GridEngineSubProcess

Returns:
the parallel environmemnt for this GridEngineSubProcess

setHostList

public void setHostList(java.lang.String hostList)
Sets the value of the hostList parameter with the given value Not yet included in the sge command

Parameters:
hostList -

getHostList

public java.lang.String getHostList()
Returns the hostList value of this process. Not yet included in the sge command

Returns:
String

setInteractive

public void setInteractive(java.lang.String interactive)
Allows to launch this GridEngineSubProcess with -I (interactive option) Not yet included in the sge command

Parameters:
interactive - true for -I option false otherwise

setOutputFile

public void setOutputFile(java.lang.String string)
Set the output file to be passed to sge Not yet included in the sge command

Parameters:
string -

setQueueName

public void setQueueName(java.lang.String queueName)
Sets the value of the queue where the job will be launched. The default is 'normal' Not yet included in the sge command

Parameters:
queueName -

parseHostname

protected java.lang.String parseHostname(java.lang.String message)

internalBuildCommand

protected java.lang.String internalBuildCommand()
Specified by:
internalBuildCommand in class AbstractExternalProcessDecorator

buildCommand

protected java.lang.String buildCommand()
Overrides:
buildCommand in class AbstractExternalProcessDecorator

buildResourceString

protected java.lang.StringBuffer buildResourceString()


Copyright 2001-2005 INRIA All Rights Reserved.