gov.bnl.star.offline.scheduler.lsf
Class CSHApplication

java.lang.Object
  extended bygov.bnl.star.offline.scheduler.lsf.CSHApplication

public class CSHApplication
extends java.lang.Object

Application module for csh.

This module defines the interface of a csh task, and prepare the task information in the following environment variables:

$JOBID - the unique job id given by the scheduler
$FILESLIST - the file name of a text file containing the file list assigned to the job
$INPUTFILECOUNT - the number of files assigned to the job
$INPUTFILExx - the input files associated to the job

Version:
1.0 2002/12/26
Author:
Gabriele Carcassi, Jerome Lauret

Constructor Summary
CSHApplication()
          Creates a new instance of CSHApplication
 
Method Summary
 java.lang.String getCommandLine()
          Returns the command line to execute the task set by setJob.
 java.lang.String getCopyScript()
          Getter for property copyScript.
 java.lang.String getCSHScriptName()
          Returns the name for the csh script.
 int getEnvVariableLimit()
          Getter for property EnvVariableLimit.
 java.lang.String getInputFileListName()
          Returns the name for the input file list file.
static CSHApplication getInstance()
          Returns the CSH application module.
 java.lang.String getJobName()
          Returns the job name to be assigned to the batch system.
 java.lang.String getRegisterScript()
          Getter for property registerScript.
 java.lang.String getStderr()
          Returns the file for standard error redirection.
 java.lang.String getStdin()
          Returns the file for standard input redirection.
 java.lang.String getStdout()
          Returns the file for standard output redirection.
 java.lang.String getStorageScript()
          Getter for property storageScript.
 boolean isRecurseCopy()
          Getter for property recurseCopy.
 void prepareJob()
          Prepares the task, by creating the script.
 void setCopyScript(java.lang.String copyScript)
          Setter for property copyScript.
 void setEnvVariableLimit(int EnvVariableLimit)
          Setter for property EnvVariableLimit.
 void setJob(Request request, Job job)
          Sets the task the application will have to prepare.
 void setRecurseCopy(boolean recurseCopy)
          Setter for property recurseCopy.
 void setRegisterScript(java.lang.String registerScript)
          Setter for property registerScript.
 void setScratchDir(java.lang.String scratchDir)
          Sets the scratch directory for the temporary output files of the job.
 void setStorageScript(java.lang.String storageScript)
          Setter for property storageScript.
 void setSubmissionCommand(java.lang.String submissionCommand)
          Sets the submittion command used to submit the job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSHApplication

public CSHApplication()
Creates a new instance of CSHApplication

Method Detail

getInstance

public static CSHApplication getInstance()
Returns the CSH application module. In the future, the application should be taken directly from the component library. This method is provided for compatibility with the old framework.

Returns:
the CSH application module

prepareJob

public void prepareJob()
Prepares the task, by creating the script.


getCommandLine

public java.lang.String getCommandLine()
Returns the command line to execute the task set by setJob.

Returns:
Command line to execute the task

setJob

public void setJob(Request request,
                   Job job)
Sets the task the application will have to prepare.

Parameters:
request - the request that originated the task
job - the job to be executed

setScratchDir

public void setScratchDir(java.lang.String scratchDir)
Sets the scratch directory for the temporary output files of the job.

Parameters:
scratchDir - the temporary output directory

setSubmissionCommand

public void setSubmissionCommand(java.lang.String submissionCommand)
Sets the submittion command used to submit the job. This will be included in the script for resubmission.

Parameters:
submissionCommand - the command line to submit the job to the batch system

getCSHScriptName

public java.lang.String getCSHScriptName()
Returns the name for the csh script.

Returns:
the csh script name

getInputFileListName

public java.lang.String getInputFileListName()
Returns the name for the input file list file.

Returns:
the input file list name

getStdin

public java.lang.String getStdin()
Returns the file for standard input redirection.

Returns:
stdin file

getStdout

public java.lang.String getStdout()
Returns the file for standard output redirection.

Returns:
stdout file

getStderr

public java.lang.String getStderr()
Returns the file for standard error redirection.

Returns:
stderr file

getJobName

public java.lang.String getJobName()
Returns the job name to be assigned to the batch system.

Returns:
the job name to be used by the batch system

isRecurseCopy

public boolean isRecurseCopy()
Getter for property recurseCopy.

Returns:
Value of property recurseCopy.

setRecurseCopy

public void setRecurseCopy(boolean recurseCopy)
Setter for property recurseCopy.

Parameters:
recurseCopy - New value of property recurseCopy.

getEnvVariableLimit

public int getEnvVariableLimit()
Getter for property EnvVariableLimit.

Returns:
Value of property EnvVariableLimit.

setEnvVariableLimit

public void setEnvVariableLimit(int EnvVariableLimit)
Setter for property EnvVariableLimit.

Parameters:
EnvVariableLimit - New value of property EnvVariableLimit.

getCopyScript

public java.lang.String getCopyScript()
Getter for property copyScript.

Returns:
Value of property copyScript.

setCopyScript

public void setCopyScript(java.lang.String copyScript)
Setter for property copyScript.

Parameters:
copyScript - New value of property copyScript.

getStorageScript

public java.lang.String getStorageScript()
Getter for property storageScript.

Returns:
Value of property storageScript.

setStorageScript

public void setStorageScript(java.lang.String storageScript)
Setter for property storageScript.

Parameters:
storageScript - New value of property storageScript.

getRegisterScript

public java.lang.String getRegisterScript()
Getter for property registerScript.

Returns:
Value of property registerScript.

setRegisterScript

public void setRegisterScript(java.lang.String registerScript)
Setter for property registerScript.

Parameters:
registerScript - New value of property registerScript.


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.