edu.isi.pegasus.planner.partitioner
public class PartitionAndPlan extends Object
| Modifier and Type | Field and Description |
|---|---|
private PegasusBag |
mBag
Bag of Pegasus objects
|
private LogManager |
mLogger
Handle to the logging manager.
|
private NumberFormat |
mNumFormatter
The number formatter to format the run submit dir entries.
|
private PlannerOptions |
mPegasusPlanOptions
The object containing all the options passed to the Concrete Planner.
|
private PegasusProperties |
mProps
The handle to Pegasus Properties.
|
private String |
mUser
The username of the user running the program.
|
| Constructor and Description |
|---|
PartitionAndPlan()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
createSubmitDirectory(ADag dag,
String dir,
String user,
String vogroup,
boolean timestampBased)
Creates the submit directory for the workflow.
|
protected String |
createSubmitDirectory(String label,
String dir,
String user,
String vogroup,
boolean timestampBased)
Creates the submit directory for the workflow.
|
protected boolean |
createSymbolicLink(String source,
String destination)
This method generates a symlink between two files
|
Collection<File> |
doPartitionAndPlan(PegasusProperties properties,
PlannerOptions options)
Partitions and plans the workflow.
|
Collection<File> |
doPartitionAndPlan(String arguments)
This function is passed command line arguments.
|
void |
initialize(PegasusBag bag)
Initializes the class.
|
protected static void |
sanityCheck(File dir)
Checks the destination location for existence, if it can
be created, if it is writable etc.
|
private String mUser
private NumberFormat mNumFormatter
private PlannerOptions mPegasusPlanOptions
private PegasusProperties mProps
private LogManager mLogger
private PegasusBag mBag
public void initialize(PegasusBag bag)
bag - the bag of objects required for initializationpublic Collection<File> doPartitionAndPlan(String arguments)
arguments - the arguments passed at runtimeFile objects for the files written
out.public Collection<File> doPartitionAndPlan(PegasusProperties properties, PlannerOptions options)
properties - the properties passed to the planner.options - the options passed to the planner.File objects for the files written
out.protected String createSubmitDirectory(ADag dag, String dir, String user, String vogroup, boolean timestampBased) throws IOException
dag - the workflow being worked upon.dir - the base directory specified by the user.user - the username of the user.vogroup - the vogroup to which the user belongs to.timestampBased - boolean indicating whether to have a timestamp based dir or notIOException - in case of unable to create submit directory.protected String createSubmitDirectory(String label, String dir, String user, String vogroup, boolean timestampBased) throws IOException
label - the label of the workflowdir - the base directory specified by the user.user - the username of the user.vogroup - the vogroup to which the user belongs to.timestampBased - boolean indicating whether to have a timestamp based dir or notIOException - in case of unable to create submit directory.protected static void sanityCheck(File dir) throws IOException
dir - is the new base directory to optionally create.IOException - in case of error while writing out files.protected boolean createSymbolicLink(String source, String destination)
source - the file that has to be symlinkeddestination - the destination of the symlink