Modifier and Type | Class and Description |
---|---|
static class |
PlannerOptions.CLEANUP_OPTIONS
The various cleanup options supported by the planner
|
Modifier and Type | Field and Description |
---|---|
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 PlannerOptions.CLEANUP_OPTIONS |
mCleanup
An enum tracking what type of cleanup needs to be done.
|
private String |
mClusterer
Denotes what type of clustering needs to be done
|
private String |
mConfFile
The conf option passed to the planner pointing to the properties file.
|
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 |
mInputDir
the input directory
|
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 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 |
mOutputDir
the output directory
|
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 String |
mShiwaBundle
the path to the shiwa bundle
|
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.
|
Constructor and Description |
---|
PlannerOptions()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
PlannerOptions.CLEANUP_OPTIONS |
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 |
getConfFile()
Returns the property file pointed to by the --conf option passed to the
planner
|
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 |
getInputDirectory()
Returns the input directory.
|
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 |
getOutputDirectory()
Returns the output directory
|
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 |
getShiwaBundle()
Returns the Shiwa Bundle set
|
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 |
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(PlannerOptions.CLEANUP_OPTIONS cleanup)
Sets the cleanup option for the planner.
|
void |
setCleanup(String cleanup)
Sets the cleanup option for the planner.
|
void |
setClusteringTechnique(String value)
Sets the clustering option.
|
void |
setConfFile(String conf)
Sets the property file pointed to by the --conf option passed to the
planner
|
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 |
setInputDirectory(String input)
Set the input directory.
|
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 |
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 |
setOutputDirectory(String output)
Set the output directory.
|
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 |
setShiwaBundle(String bundle)
Sets the path to the Shiwa Bundle to be used.
|
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.
|
setToString, vectorToString
public static final int DEFAULT_LOGGING_LEVEL
public static final int DEFAULT_NUMBER_OF_RESCUE_TRIES
private String mBaseDir
private String mRelativeDir
private String mRelativeSubmitDir
private String mDAXFile
private String mPDAXFile
private Set mvExecPools
private Set<String> mCacheFiles
private Set<String> mInheritedRCFiles
private String mOutputPool
private boolean mSubmit
private boolean mForce
private PlannerOptions.CLEANUP_OPTIONS mCleanup
private boolean mDisplayHelp
private int mLoggingLevel
private boolean mGenRandomDir
private boolean mAuthenticate
private String mMegadag
private List mVDSProps
NameValue
pairs, with name as vds property
name and value as the corresponding value.private String mClusterer
private String mRandomDirName
private boolean mOptArg
private String mBasenamePrefix
private String mJobPrefix
private boolean mDeferredRun
private String mVOGroup
private Date mDate
private String mPartitioningType
private boolean mSanitizePath
private int mNumOfRescueTries
private Properties mProperties
private List<NameValue> mForwardOptions
private Set<String> mNonStandardJavaOptions
private boolean mForceReplan
private String mOriginalArgumentString
private Map<String,String> mStagingSitesMap
private String mShiwaBundle
private String mInputDir
private String mOutputDir
private String mConfFile
public boolean authenticationSet()
public Set getCacheFiles()
public Set<String> getInheritedRCFiles()
public String getClusteringTechnique()
public String getBasenamePrefix()
public String getJobnamePrefix()
public String getDAX()
public Collection getExecutionSites()
Set
of execution site names.public boolean getForce()
public boolean getForceReplan()
public PlannerOptions.CLEANUP_OPTIONS getCleanup()
public String getDateTime(boolean extendedFormat)
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.public boolean getHelp()
public String getShiwaBundle()
public void incrementLogging()
public void decrementLogging()
public int getLoggingLevel()
public String getMegaDAGMode()
public String getInputDirectory()
public String getOutputDirectory()
public String getOutputSite()
public String getPDAX()
public boolean generateRandomDirectory()
public String getRandomDir()
public String getRandomDirName()
public String getOriginalArgString()
public void setOriginalArgString(String[] args)
args
- the arguments with which the planner was invoked.public void setProperty(String optarg)
optarg
- key=value property specificationpublic void setShiwaBundle(String bundle)
bundle
- the shiwa bundlepublic boolean submitToScheduler()
public List getVDSProperties()
NameValue
objects each corresponding to a
property key and value.public String getVOGroup()
public String getBaseSubmitDirectory()
public String getRelativeDirectory()
public String getRelativeSubmitDirectoryOption()
public String getRelativeSubmitDirectory()
public String getSubmitDirectory()
public String getConfFile()
public void setAuthentication(boolean value)
value
- boolean value passed.public void setBasenamePrefix(String prefix)
prefix
- the prefix to be set.public void setJobnamePrefix(String prefix)
prefix
- the job prefix .public void setOptionalArg(boolean value)
value
- boolean indicating whether the optional argument was given
or not.public boolean optionalArgSet()
public void setPartitioningType(String type)
type
- the type of partitioning techniquepublic String getPartitioningType()
public void setPartOfDeferredRun(boolean value)
value
- the valuepublic boolean partOfDeferredRun()
public void setSanitizePath(boolean value)
value
- the value to setpublic void setCacheFiles(String cacheList)
cacheList
- comma separated list of cache files.public void setCacheFiles(Set files)
files
- the set of fully qualified paths to the cache files.public void setInheritedRCFiles(String list)
l
- comma separated list of cache files.public void setInheritedRCFiles(Set files)
files
- the set of fully qualified paths to the cache files.public void setClusteringTechnique(String value)
value
- the value to set.public void setDAX(String dax)
dax
- the path to the DAX file.public void setExecutionSites(String siteList)
siteList
- comma separated list of sites.public void setExecutionSites(Collection sites)
sites
- Collection
of execution site names.public void setForce(boolean force)
force
- boolean value.public void setForceReplan(boolean force)
force
- the boolean valuepublic void addToForwardOptions(String argument)
argument
- the argument to be passed.public List<NameValue> getForwardOptions()
public void setCleanup(String cleanup)
cleanup
- the cleanup optionpublic void setCleanup(PlannerOptions.CLEANUP_OPTIONS cleanup)
cleanup
- the cleanup optionpublic void setHelp(boolean help)
help
- boolean value.public void setLoggingLevel(String level)
level
- the logging level.public void setMegaDAGMode(String mode)
mode
- the mode.public void setPDAX(String pdax)
pdax
- the path to the PDAX file.public void setInputDirectory(String input)
input
- the input directory for the workflowpublic void setOutputDirectory(String output)
output
- the input directory for the workflowpublic void setOutputSite(String site)
site
- the output site.public void setRandomDir(String dir)
dir
- the basename of the random directory.public void setSubmitToScheduler(boolean submit)
submit
- boolean indicating whether to submit or not.public void setSubmitDirectory(String dir)
dir
- the path to the directory.public void setSubmitDirectory(File dir)
dir
- the path to the directory.public void setSubmitDirectory(String base, String relative)
base
- the path to the base directory.relative
- the directory relative to the base where submit files are generated.public void setBaseSubmitDirectory(String base)
base
- the base directory where submit files are generated.public void setRelativeDirectory(String relative)
relative
- the directory relative to the base where submit files are generated.public void setRelativeSubmitDirectory(String relative)
relative
- the directory relative to the base where submit files are generated.public void setVDSProperties(List properties)
properties
- List of NameValue
objects.public void setVOGroup(String group)
group
- the VOGrouppublic void setNumberOfRescueTries(String num)
num
- number.public void setNumberOfRescueTries(int num)
num
- number.public int getNumberOfRescueTries()
public void addToNonStandardJavaOptions(String option)
option
- the non standard option.public Set<String> getNonStandardJavaOptions()
public void addToStagingSitesMappings(String value)
value
- comma separated key=value pairs where key is execution site
and value is the staging site to use for that execution sitepublic void addToStagingSitesMappings(String executionSite, String stagingSite)
executionSite
- the execution sitestagingSite
- the staging site.public String getStagingSite(String executionSite)
executionSite
- the execution siteprotected String stagingSiteMappingToString()
public void setConfFile(String conf)
conf
- the conf option if passed, else nullpublic String toString()
public String toOptions()
public String toJVMOptions()
public String getCompleteOptions()
private Set cloneSet(Set s)
s
- Setpublic Object clone()
private Set generateSet(String str)
str
- the comma separted String.private String sanitizePath(String path)
path
- the absolute or the relative path.