edu.isi.pegasus.planner.classes
Class PlannerOptions

java.lang.Object
  extended by edu.isi.pegasus.planner.classes.Data
      extended by edu.isi.pegasus.planner.classes.PlannerOptions
All Implemented Interfaces:
Cloneable

public class PlannerOptions
extends Data
implements Cloneable

Holds the information about thevarious options which user specifies to the Concrete Planner at runtime.

Version:
$Revision: 4797 $
Author:
Karan Vahi, Gaurang Mehta

Field Summary
static int DEFAULT_LOGGING_LEVEL
          The default logging level.
static int DEFAULT_NUMBER_OF_RESCUE_TRIES
          The value of number of rescue retries if no value is specified
private  boolean mAuthenticate
          Whether to attempt authentication against the jobmanagers for the pools specified at runtime.
private  String mBaseDir
          The base submit directory.
private  String mBasenamePrefix
          The basename prefix that is to be given to the per workflow file, like the log file, the .dag file, the .cache files etc.
private  Set<String> mCacheFiles
          Set of cache files that need to be used, to determine the location of the transiency files.
private  boolean mCleanup
          A boolean indicating whether to do cleanup or not.
private  String mClusterer
          Denotes what type of clustering needs to be done
private  Date mDate
          Stores the time at which the planning process started.
private  String mDAXFile
          The dax file which contains the abstract dag.
private  boolean mDeferredRun
          A boolean indicating whether the planner invocation is part of a larger deferred planning run.
private  boolean mDisplayHelp
          To Display help or not.
private  boolean mForce
          The force option to make a build dag from scratch.
private  boolean mForceReplan
          Returns the force replan option
private  List<NameValue> mForwardOptions
          The options that need to be passed forward to pegasus-run.
private  boolean mGenRandomDir
          Whether to create a random directory in the execution directory that is determined from the exec mount point in the pool configuration file.
private  Set<String> mInheritedRCFiles
          Set of replica catalog files that are inherited by a planning instance.
private  String mJobPrefix
          The prefix that is to be applied while constructing job names.
private  int mLoggingLevel
          Denotes the logging level that is to be used for logging the messages.
private  String mMegadag
          The megadag generation mode.
private  boolean mMonitor
          Boolean indicating whether to spawn off a monitoring process or not for the workflow.
private  Set<String> mNonStandardJavaOptions
          The set of non standard java options that need to be passed to the JVM
private  int mNumOfRescueTries
          The numer of rescue's to try before replanning.
private  boolean mOptArg
          Designates if the optional argument to the random directory was given.
private  String mOriginalArgumentString
          The argument string with which the planner was invoked.
private  String mOutputPool
          The output pool on which the data products are needed to be transferred to.
private  String mPartitioningType
          Stores the type of partitioning to be done.
private  String mPDAXFile
          The path to the pdax file that contains the partition graph.
private  Properties mProperties
          The properties container for properties specified on the commandline in the DAX dax elements.
private  String mRandomDirName
          If the genRandomDir flag is set, then this contains the name of the random directory.
private  String mRelativeDir
          The relative directory for the submit directory and remote execution directory
private  String mRelativeSubmitDir
          The relative directory for the submit directory.
private  boolean mSanitizePath
          A boolean storing whether to sanitize paths or not
private  Map<String,String> mStagingSitesMap
          A map that maps an execution site to a staging site.
private  boolean mSubmit
          If specified, then it submits to the underlying CondorG using the kickstart-Condorscript provided.
private  List mVDSProps
          The list of VDS properties set at runtime by the user on commandline.
private  Set mvExecPools
          List of execution pools on which the user wants the Dag to be executed.
private  String mVOGroup
          The VOGroup to which the user belongs to.
 
Fields inherited from class edu.isi.pegasus.planner.classes.Data
mLogger, mLogMsg
 
Constructor Summary
PlannerOptions()
          Default Constructor.
 
Method Summary
 void addToForwardOptions(String argument)
          Parses the argument in form of option=[value] and adds to the options that are to be passed ahead to pegasus-run.
 void addToNonStandardJavaOptions(String option)
          Adds to the Set of non standard JAVA options that need to be passed to the JVM.
 void addToStagingSitesMappings(String value)
          Adds to the staging sites
 void addToStagingSitesMappings(String executionSite, String stagingSite)
          Adds to the staging sites
 boolean authenticationSet()
          Returns the authenticate option for the planner.
 Object clone()
          Returns a new copy of the Object.
private  Set cloneSet(Set s)
          Clones a Set.
 void decrementLogging()
          Deccrements the logging level by 1.
 boolean generateRandomDirectory()
          Returns whether to generate a random directory or not.
private  Set generateSet(String str)
          Generates a Set by parsing a comma separated string.
 String getBasenamePrefix()
          Returns the basename prefix for the per workflow files that are to be generated by the planner.
 String getBaseSubmitDirectory()
          Returns the base submit directory
 Set getCacheFiles()
          Returns the cache files.
 boolean getCleanup()
          Returns the option indicating whether to do cleanup or not.
 String getClusteringTechnique()
          Returns the clustering technique to be used for clustering.
 String getCompleteOptions()
          Returns the complete options string that is used to invoke pegasus
 String getDateTime(boolean extendedFormat)
          Returns the time at which planning started in a ISO 8601 format.
 String getDAX()
          Returns the path to the dax file being used by the planner.
 Collection getExecutionSites()
          Returns the names of the execution sites where the concrete workflow can be run.
 boolean getForce()
          Returns the force option set for the planner.
 boolean getForceReplan()
          Returns the force replan option
 List<NameValue> getForwardOptions()
          Returns the forward options set
 boolean getHelp()
          Returns whether to display or not.
 Set<String> getInheritedRCFiles()
          Returns the inherited rc files.
 String getJobnamePrefix()
          Returns the job prefix to be used while constructing the job names.
 int getLoggingLevel()
          Returns the logging level.
 String getMegaDAGMode()
          Returns the megadag generation option .
 Set<String> getNonStandardJavaOptions()
          Returns the Set of non standard java options.
 int getNumberOfRescueTries()
          Returns the number of times to try for rescue dag submission.
 String getOriginalArgString()
          Returns the argument string of how planner was invoked.
 String getOutputSite()
          Returns the output site where to stage the output .
 String getPartitioningType()
          Returns the partitioning type in case of partition and plan.
 String getPDAX()
          Returns the path to the PDAX file being used by the planner.
 String getRandomDir()
          Returns the random directory option.
 String getRandomDirName()
          Returns the name of the random directory, only if the generate Random Dir flag is set.
 String getRelativeDirectory()
          Returns the relative directory.
 String getRelativeSubmitDirectory()
          Returns the relative submit directory.
 String getRelativeSubmitDirectoryOption()
          Returns the relative submit directory option.
 String getStagingSite(String executionSite)
          Returns the staging site for an execution site.
 String getSubmitDirectory()
          Returns the path to the directory where the submit files are to be generated.
 List getVDSProperties()
          Returns the VDS properties that were set by the user.
 String getVOGroup()
          Returns the VO Group to which the user belongs
 void incrementLogging()
          Increments the logging level by 1.
 boolean monitorWorkflow()
          Returns boolean indicating whether we want to monitor or not.
 boolean optionalArgSet()
          Returns the flag to denote whether the optional argument for the random was specified or not.
 boolean partOfDeferredRun()
          Returns a boolean indicating whether this invocation is part of a deferred execution or not.
private  String sanitizePath(String path)
          A small utility method that santizes the url, converting it from relative to absolute.
 void setAuthentication(boolean value)
          Sets the authenticate flag to the value passed.
 void setBasenamePrefix(String prefix)
          Sets the basename prefix for the per workflow files.
 void setBaseSubmitDirectory(String base)
          Sets the path to the base submitdirectory where the submit files are to be generated.
 void setCacheFiles(Set files)
          Sets the caches files.
 void setCacheFiles(String cacheList)
          Sets the caches files.
 void setCleanup(boolean cleanup)
          Sets the cleanup option for the planner.
 void setClusteringTechnique(String value)
          Sets the clustering option.
 void setDAX(String dax)
          Sets the DAX that has to be worked on by the planner.
 void setExecutionSites(Collection sites)
          Sets the names of the execution sites where the concrete workflow can be run.
 void setExecutionSites(String siteList)
          Sets the names of the execution sites where the concrete workflow can be run.
 void setForce(boolean force)
          Sets the force option for the planner.
 void setForceReplan(boolean force)
          Sets the force replan option
 void setHelp(boolean help)
          Sets the help option for the planner.
 void setInheritedRCFiles(Set files)
          Sets the inherited RC Files.
 void setInheritedRCFiles(String list)
          Sets the inherited RC Files.
 void setJobnamePrefix(String prefix)
          Sets the job prefix to be used while constructing the job names.
 void setLoggingLevel(String level)
          Sets the logging level for logging of messages.
 void setMegaDAGMode(String mode)
          Sets the megadag generation option
 void setMonitoring(boolean value)
          Sets the flag to denote whether we want to monitor the workflow or not.
 void setNumberOfRescueTries(int num)
          Sets the number of times to try for rescue dag submission.
 void setNumberOfRescueTries(String num)
          Sets the number of times to try for rescue dag submission.
 void setOptionalArg(boolean value)
          Sets the flag to denote that the optional argument for the random was specified.
 void setOriginalArgString(String[] args)
          Sets the argument string of how planner was invoked.
 void setOutputSite(String site)
          Sets the output site specified by the user.
 void setPartitioningType(String type)
          Sets the partitioning type in case of partition and plan.
 void setPartOfDeferredRun(boolean value)
          Sets the flag to denote that the run is part of a larger deferred run.
 void setPDAX(String pdax)
          Sets the PDAX that has to be worked on by the planner.
 void setProperty(String optarg)
          Sets a property passed on the command line.
 void setRandomDir(String dir)
          Sets the random directory in which the jobs are run.
 void setRelativeDirectory(String relative)
          Sets the path to the relative directory where the submit files are to be generated.
 void setRelativeSubmitDirectory(String relative)
          Sets the path to the directory where the submit files are to be generated.
 void setSanitizePath(boolean value)
          Sets the flag denoting whether to sanitize path or not.
 void setSubmitDirectory(File dir)
          Sets the path to the directory where the submit files are to be generated.
 void setSubmitDirectory(String dir)
          Sets the path to the directory where the submit files are to be generated.
 void setSubmitDirectory(String base, String relative)
          Sets the path to the directory where the submit files are to be generated.
 void setSubmitToScheduler(boolean submit)
          Returns whether to submit the workflow or not.
 void setVDSProperties(List properties)
          Sets the VDS properties specifed by the user at the command line.
 void setVOGroup(String group)
          Set the VO Group to which the user belongs
protected  String stagingSiteMappingToString()
          Convers the staging site mappings to comma separated list of executionsite=stagingsite mappings
 boolean submitToScheduler()
          Returns whether to submit the workflow or not.
 String toJVMOptions()
          Converts the vds properties that need to be passed to the jvm as an option.
 String toOptions()
          Generates the argument string corresponding to these options that can be used to invoke Pegasus.
 String toString()
          Returns the textual description of all the options that were set for the planner.
 
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_LOGGING_LEVEL

public static final int DEFAULT_LOGGING_LEVEL
The default logging level.

See Also:
Constant Field Values

DEFAULT_NUMBER_OF_RESCUE_TRIES

public static final int DEFAULT_NUMBER_OF_RESCUE_TRIES
The value of number of rescue retries if no value is specified

See Also:
Constant Field Values

mBaseDir

private String mBaseDir
The base submit directory.


mRelativeDir

private String mRelativeDir
The relative directory for the submit directory and remote execution directory


mRelativeSubmitDir

private String mRelativeSubmitDir
The relative directory for the submit directory. Overrides relative dir if both are specified.


mDAXFile

private String mDAXFile
The dax file which contains the abstract dag. This dax is created by the Abstract Planner using the gendax command.


mPDAXFile

private String mPDAXFile
The path to the pdax file that contains the partition graph.


mvExecPools

private Set mvExecPools
List of execution pools on which the user wants the Dag to be executed.


mCacheFiles

private Set<String> mCacheFiles
Set of cache files that need to be used, to determine the location of the transiency files.


mInheritedRCFiles

private Set<String> mInheritedRCFiles
Set of replica catalog files that are inherited by a planning instance. Locations in this file have a lower priority than the file locations mentioned in the DAX Replica Store


mOutputPool

private String mOutputPool
The output pool on which the data products are needed to be transferred to.


mSubmit

private boolean mSubmit
If specified, then it submits to the underlying CondorG using the kickstart-Condorscript provided.


mForce

private boolean mForce
The force option to make a build dag from scratch. Leads to no reduction of dag occuring.


mCleanup

private boolean mCleanup
A boolean indicating whether to do cleanup or not.


mDisplayHelp

private boolean mDisplayHelp
To Display help or not.


mLoggingLevel

private int mLoggingLevel
Denotes the logging level that is to be used for logging the messages.


mGenRandomDir

private boolean mGenRandomDir
Whether to create a random directory in the execution directory that is determined from the exec mount point in the pool configuration file. This forces Pegasus to do runs in a unique random directory just below the execution mount point at a remote pool.


mAuthenticate

private boolean mAuthenticate
Whether to attempt authentication against the jobmanagers for the pools specified at runtime.


mMegadag

private String mMegadag
The megadag generation mode.


mVDSProps

private List mVDSProps
The list of VDS properties set at runtime by the user on commandline. It is a list of NameValue pairs, with name as vds property name and value as the corresponding value.


mClusterer

private String mClusterer
Denotes what type of clustering needs to be done


mRandomDirName

private String mRandomDirName
If the genRandomDir flag is set, then this contains the name of the random directory. Else it can be a null or an empty string.


mOptArg

private boolean mOptArg
Designates if the optional argument to the random directory was given.


mBasenamePrefix

private String mBasenamePrefix
The basename prefix that is to be given to the per workflow file, like the log file, the .dag file, the .cache files etc.


mJobPrefix

private String mJobPrefix
The prefix that is to be applied while constructing job names.


mDeferredRun

private boolean mDeferredRun
A boolean indicating whether the planner invocation is part of a larger deferred planning run.


mMonitor

private boolean mMonitor
Boolean indicating whether to spawn off a monitoring process or not for the workflow.


mVOGroup

private String mVOGroup
The VOGroup to which the user belongs to.


mDate

private Date mDate
Stores the time at which the planning process started.


mPartitioningType

private String mPartitioningType
Stores the type of partitioning to be done.


mSanitizePath

private boolean mSanitizePath
A boolean storing whether to sanitize paths or not


mNumOfRescueTries

private int mNumOfRescueTries
The numer of rescue's to try before replanning.


mProperties

private Properties mProperties
The properties container for properties specified on the commandline in the DAX dax elements.


mForwardOptions

private List<NameValue> mForwardOptions
The options that need to be passed forward to pegasus-run.


mNonStandardJavaOptions

private Set<String> mNonStandardJavaOptions
The set of non standard java options that need to be passed to the JVM


mForceReplan

private boolean mForceReplan
Returns the force replan option


mOriginalArgumentString

private String mOriginalArgumentString
The argument string with which the planner was invoked.


mStagingSitesMap

private Map<String,String> mStagingSitesMap
A map that maps an execution site to a staging site.

Constructor Detail

PlannerOptions

public PlannerOptions()
Default Constructor.

Method Detail

authenticationSet

public boolean authenticationSet()
Returns the authenticate option for the planner.

Returns:
boolean indicating if it was set or not.

getCacheFiles

public Set getCacheFiles()
Returns the cache files.

Returns:
Set of fully qualified paths to the cache files.

getInheritedRCFiles

public Set<String> getInheritedRCFiles()
Returns the inherited rc files.

Returns:
Set of fully qualified paths to the cache files.

getClusteringTechnique

public String getClusteringTechnique()
Returns the clustering technique to be used for clustering.

Returns:
the value of clustering technique if set, else null

getBasenamePrefix

public String getBasenamePrefix()
Returns the basename prefix for the per workflow files that are to be generated by the planner.

Returns:
the basename if set, else null.

getJobnamePrefix

public String getJobnamePrefix()
Returns the job prefix to be used while constructing the job names.

Returns:
the job prefix if set, else null.

getDAX

public String getDAX()
Returns the path to the dax file being used by the planner.

Returns:
path to DAX file.

getExecutionSites

public Collection getExecutionSites()
Returns the names of the execution sites where the concrete workflow can be run.

Returns:
Set of execution site names.

getForce

public boolean getForce()
Returns the force option set for the planner.

Returns:
the boolean value indicating the force option.

getForceReplan

public boolean getForceReplan()
Returns the force replan option

Returns:
boolean

getCleanup

public boolean getCleanup()
Returns the option indicating whether to do cleanup or not.

Returns:
the boolean value indicating the cleanup option.

getDateTime

public String getDateTime(boolean extendedFormat)
Returns the time at which planning started in a ISO 8601 format.

Parameters:
extendedFormat - will use the extended ISO 8601 format which separates the different timestamp items. If false, the basic format will be used. In UTC and basic format, the 'T' separator will be omitted.
Returns:
String

getHelp

public boolean getHelp()
Returns whether to display or not.

Returns:
help boolean value.

incrementLogging

public void incrementLogging()
Increments the logging level by 1.


decrementLogging

public void decrementLogging()
Deccrements the logging level by 1.


getLoggingLevel

public int getLoggingLevel()
Returns the logging level.

Returns:
the logging level.

getMegaDAGMode

public String getMegaDAGMode()
Returns the megadag generation option .

Returns:
the mode if mode is set else null

getOutputSite

public String getOutputSite()
Returns the output site where to stage the output .

Returns:
the output site.

getPDAX

public String getPDAX()
Returns the path to the PDAX file being used by the planner.

Returns:
path to PDAX file.

generateRandomDirectory

public boolean generateRandomDirectory()
Returns whether to generate a random directory or not.

Returns:
boolean

getRandomDir

public String getRandomDir()
Returns the random directory option.

Returns:
the directory name null if not set.

getRandomDirName

public String getRandomDirName()
Returns the name of the random directory, only if the generate Random Dir flag is set. Else it returns null.


getOriginalArgString

public String getOriginalArgString()
Returns the argument string of how planner was invoked.

Returns:
the arguments with which the planner was invoked.

setOriginalArgString

public void setOriginalArgString(String[] args)
Sets the argument string of how planner was invoked. This function just stores the arguments as a String internally.

Parameters:
args - the arguments with which the planner was invoked.

setProperty

public void setProperty(String optarg)
Sets a property passed on the command line.

Parameters:
optarg - key=value property specification

submitToScheduler

public boolean submitToScheduler()
Returns whether to submit the workflow or not.

Returns:
boolean indicating whether to submit or not.

getVDSProperties

public List getVDSProperties()
Returns the VDS properties that were set by the user.

Returns:
List of NameValue objects each corresponding to a property key and value.

getVOGroup

public String getVOGroup()
Returns the VO Group to which the user belongs

Returns:
VOGroup

getBaseSubmitDirectory

public String getBaseSubmitDirectory()
Returns the base submit directory

Returns:
the path to the directory.

getRelativeDirectory

public String getRelativeDirectory()
Returns the relative directory.

Returns:
the relative directory

getRelativeSubmitDirectoryOption

public String getRelativeSubmitDirectoryOption()
Returns the relative submit directory option.

Returns:
the relative submit directory option if specified else null

getRelativeSubmitDirectory

public String getRelativeSubmitDirectory()
Returns the relative submit directory.

Returns:
the relative submit directory if specified else the relative dir.

getSubmitDirectory

public String getSubmitDirectory()
Returns the path to the directory where the submit files are to be generated. The relative submit directory if specified overrides the relative directory.

Returns:
the path to the directory.

setAuthentication

public void setAuthentication(boolean value)
Sets the authenticate flag to the value passed.

Parameters:
value - boolean value passed.

setBasenamePrefix

public void setBasenamePrefix(String prefix)
Sets the basename prefix for the per workflow files.

Parameters:
prefix - the prefix to be set.

setJobnamePrefix

public void setJobnamePrefix(String prefix)
Sets the job prefix to be used while constructing the job names.

Parameters:
prefix - the job prefix .

setOptionalArg

public void setOptionalArg(boolean value)
Sets the flag to denote that the optional argument for the random was specified.

Parameters:
value - boolean indicating whether the optional argument was given or not.

optionalArgSet

public boolean optionalArgSet()
Returns the flag to denote whether the optional argument for the random was specified or not.

Returns:
boolean indicating whether the optional argument was supplied or not.

setMonitoring

public void setMonitoring(boolean value)
Sets the flag to denote whether we want to monitor the workflow or not.

Parameters:
value - boolean.

monitorWorkflow

public boolean monitorWorkflow()
Returns boolean indicating whether we want to monitor or not.

Returns:
boolean indicating whether monitoring was set or not.

setPartitioningType

public void setPartitioningType(String type)
Sets the partitioning type in case of partition and plan.

Parameters:
type - the type of partitioning technique

getPartitioningType

public String getPartitioningType()
Returns the partitioning type in case of partition and plan.

Returns:
the type of partitioning technique

setPartOfDeferredRun

public void setPartOfDeferredRun(boolean value)
Sets the flag to denote that the run is part of a larger deferred run.

Parameters:
value - the value

partOfDeferredRun

public boolean partOfDeferredRun()
Returns a boolean indicating whether this invocation is part of a deferred execution or not.

Returns:
boolean

setSanitizePath

public void setSanitizePath(boolean value)
Sets the flag denoting whether to sanitize path or not.

Parameters:
value - the value to set

setCacheFiles

public void setCacheFiles(String cacheList)
Sets the caches files. If cache files have been already specified it adds to the existing set of files. It also sanitizes the paths. Tries to resolve the path, if the path given is relative instead of absolute.

Parameters:
cacheList - comma separated list of cache files.

setCacheFiles

public void setCacheFiles(Set files)
Sets the caches files. If cache files have been already specified it adds to the existing set of files. It also sanitizes the paths. Tries to resolve the path, if the path given is relative instead of absolute.

Parameters:
files - the set of fully qualified paths to the cache files.

setInheritedRCFiles

public void setInheritedRCFiles(String list)
Sets the inherited RC Files. If RC files have been already specified it adds to the existing set of files. It also sanitizes the paths. Tries to resolve the path, if the path given is relative instead of absolute.

Parameters:
l - comma separated list of cache files.

setInheritedRCFiles

public void setInheritedRCFiles(Set files)
Sets the inherited RC Files. If RC files have been already specified it adds to the existing set of files. It also sanitizes the paths. Tries to resolve the path, if the path given is relative instead of absolute.

Parameters:
files - the set of fully qualified paths to the cache files.

setClusteringTechnique

public void setClusteringTechnique(String value)
Sets the clustering option.

Parameters:
value - the value to set.

setDAX

public void setDAX(String dax)
Sets the DAX that has to be worked on by the planner.

Parameters:
dax - the path to the DAX file.

setExecutionSites

public void setExecutionSites(String siteList)
Sets the names of the execution sites where the concrete workflow can be run.

Parameters:
siteList - comma separated list of sites.

setExecutionSites

public void setExecutionSites(Collection sites)
Sets the names of the execution sites where the concrete workflow can be run.

Parameters:
sites - Collection of execution site names.

setForce

public void setForce(boolean force)
Sets the force option for the planner.

Parameters:
force - boolean value.

setForceReplan

public void setForceReplan(boolean force)
Sets the force replan option

Parameters:
force - the boolean value

addToForwardOptions

public void addToForwardOptions(String argument)
Parses the argument in form of option=[value] and adds to the options that are to be passed ahead to pegasus-run.

Parameters:
argument - the argument to be passed.

getForwardOptions

public List<NameValue> getForwardOptions()
Returns the forward options set

Returns:
List containing the option and the value.

setCleanup

public void setCleanup(boolean cleanup)
Sets the cleanup option for the planner.

Parameters:
cleanup - boolean value.

setHelp

public void setHelp(boolean help)
Sets the help option for the planner.

Parameters:
help - boolean value.

setLoggingLevel

public void setLoggingLevel(String level)
Sets the logging level for logging of messages.

Parameters:
level - the logging level.

setMegaDAGMode

public void setMegaDAGMode(String mode)
Sets the megadag generation option

Parameters:
mode - the mode.

setPDAX

public void setPDAX(String pdax)
Sets the PDAX that has to be worked on by the planner.

Parameters:
pdax - the path to the PDAX file.

setOutputSite

public void setOutputSite(String site)
Sets the output site specified by the user.

Parameters:
site - the output site.

setRandomDir

public void setRandomDir(String dir)
Sets the random directory in which the jobs are run.

Parameters:
dir - the basename of the random directory.

setSubmitToScheduler

public void setSubmitToScheduler(boolean submit)
Returns whether to submit the workflow or not.

Parameters:
submit - boolean indicating whether to submit or not.

setSubmitDirectory

public void setSubmitDirectory(String dir)
Sets the path to the directory where the submit files are to be generated.

Parameters:
dir - the path to the directory.

setSubmitDirectory

public void setSubmitDirectory(File dir)
Sets the path to the directory where the submit files are to be generated.

Parameters:
dir - the path to the directory.

setSubmitDirectory

public void setSubmitDirectory(String base,
                               String relative)
Sets the path to the directory where the submit files are to be generated.

Parameters:
base - the path to the base directory.
relative - the directory relative to the base where submit files are generated.

setBaseSubmitDirectory

public void setBaseSubmitDirectory(String base)
Sets the path to the base submitdirectory where the submit files are to be generated.

Parameters:
base - the base directory where submit files are generated.

setRelativeDirectory

public void setRelativeDirectory(String relative)
Sets the path to the relative directory where the submit files are to be generated. The submit directory can be overridden by setRelativeSubmitDirectory( String)

Parameters:
relative - the directory relative to the base where submit files are generated.

setRelativeSubmitDirectory

public void setRelativeSubmitDirectory(String relative)
Sets the path to the directory where the submit files are to be generated.

Parameters:
relative - the directory relative to the base where submit files are generated.

setVDSProperties

public void setVDSProperties(List properties)
Sets the VDS properties specifed by the user at the command line.

Parameters:
properties - List of NameValue objects.

setVOGroup

public void setVOGroup(String group)
Set the VO Group to which the user belongs

Parameters:
group - the VOGroup

setNumberOfRescueTries

public void setNumberOfRescueTries(String num)
Sets the number of times to try for rescue dag submission.

Parameters:
num - number.

setNumberOfRescueTries

public void setNumberOfRescueTries(int num)
Sets the number of times to try for rescue dag submission.

Parameters:
num - number.

getNumberOfRescueTries

public int getNumberOfRescueTries()
Returns the number of times to try for rescue dag submission.

Returns:
number.

addToNonStandardJavaOptions

public void addToNonStandardJavaOptions(String option)
Adds to the Set of non standard JAVA options that need to be passed to the JVM. The list of non standard java options can be retrieved by doing java -X . The option is always prefixed by -X internally. If mx1024m is passed, internally option will be set to -Xmx1024m

Parameters:
option - the non standard option.

getNonStandardJavaOptions

public Set<String> getNonStandardJavaOptions()
Returns the Set of non standard java options.

Returns:
Set

addToStagingSitesMappings

public void addToStagingSitesMappings(String value)
Adds to the staging sites

Parameters:
value - comma separated key=value pairs where key is execution site and value is the staging site to use for that execution site

addToStagingSitesMappings

public void addToStagingSitesMappings(String executionSite,
                                      String stagingSite)
Adds to the staging sites

Parameters:
executionSite - the execution site
stagingSite - the staging site.

getStagingSite

public String getStagingSite(String executionSite)
Returns the staging site for an execution site.

Parameters:
executionSite - the execution site
Returns:
the staging site corresponding to an execution site, else null

stagingSiteMappingToString

protected String stagingSiteMappingToString()
Convers the staging site mappings to comma separated list of executionsite=stagingsite mappings

Returns:
mappings as string

toString

public String toString()
Returns the textual description of all the options that were set for the planner.

Specified by:
toString in class Data
Returns:
the textual description.

toOptions

public String toOptions()
Generates the argument string corresponding to these options that can be used to invoke Pegasus. During its generation it ignores the dax and pdax options as they are specified elsewhere.

Returns:
all the options in a String separated by whitespace.

toJVMOptions

public String toJVMOptions()
Converts the vds properties that need to be passed to the jvm as an option.

Returns:
the jvm options as String.

getCompleteOptions

public String getCompleteOptions()
Returns the complete options string that is used to invoke pegasus

Returns:
the options as string.

cloneSet

private Set cloneSet(Set s)
Clones a Set.

Parameters:
s - Set
Returns:
the cloned set as a HashSet

clone

public Object clone()
Returns a new copy of the Object. The clone does not clone the internal VDS properties at the moment.

Overrides:
clone in class Object
Returns:
the cloned copy.

generateSet

private Set generateSet(String str)
Generates a Set by parsing a comma separated string.

Parameters:
str - the comma separted String.
Returns:
Set containing the parsed values, in case of a null string an empty set is returned.

sanitizePath

private String sanitizePath(String path)
A small utility method that santizes the url, converting it from relative to absolute. In case the path is relative, it uses the System property user.dir to get the current working directory, from where the planner is being run.

Parameters:
path - the absolute or the relative path.
Returns:
the absolute path.


Copyright © 2011 The University of Southern California. All Rights Reserved.