| java.lang.Object org.griphyn.cPlanner.toolkit.Executable org.griphyn.cPlanner.toolkit.CPlanner
CPlanner | public class CPlanner extends Executable (Code) | | This is the main program for the Pegasus. It parses the options specified
by the user and calls out to the appropriate components to parse the abstract
plan, concretize it and then write the submit files.
author: Gaurang Mehta author: Karan Vahi version: $Revision: 464 $ |
Field Summary | |
final public static String | CLEANUP_DIR The basename of the directory that contains the submit files for the
cleanup DAG that for the concrete dag generated for the workflow. | final public static String | DEFAULT_MEGADAG_MODE The default megadag mode that is used for generation of megadags in
deferred planning. | final public static String | SUBMIT_DIRECTORY_PREFIX The prefix for the submit directory. |
Constructor Summary | |
public | CPlanner() Default constructor. |
Method Summary | |
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 void | doPartitionAndPlan(PegasusProperties properties, PlannerOptions options) Partitions and plans the workflow. | public void | executeCommand(String[] args) Executes the command on the basis of the options specified. | public void | executeCommand(PlannerOptions options) Executes the command on the basis of the options specified. | public LongOpt[] | generateValidOptions() Tt generates the LongOpt which contain the valid options that the command
will accept. | protected String | getRandomDirectory(ADag dag) Sets the basename of the random directory that is created on the remote
sites per workflow. | public void | loadProperties() Loads all the properties that are needed by this class. | protected boolean | logEntryInWorkCatalog(ADag dag, String baseDir, String relativeDir) Logs an entry in the work catalog about the workflow being planned. | public static void | main(String[] args) The main program for the CPlanner. | public PlannerOptions | parseCommandLineArguments(String[] args) Parses the command line arguments using GetOpt and returns a
PlannerOptions contains all the options passed by the
user at the command line.
Parameters: args - the arguments passed by the user at command line. | public void | printLongVersion() Prints the long description, displaying in detail what the various options
to the command stand for. | public void | printShortVersion() Prints out a short description of what the command does. | protected static void | sanityCheck(File dir) Checks the destination location for existence, if it can
be created, if it is writable etc. | public boolean | submitWorkflow(String invocation) Submits the workflow for execution using pegasus-run, a wrapper around
pegasus-submit-dag. | protected boolean | writeOutMetrics(PlannerMetrics pm) Writes out the planner metrics to the global log.
Parameters: pm - the metrics to be written out. |
CLEANUP_DIR | final public static String CLEANUP_DIR(Code) | | The basename of the directory that contains the submit files for the
cleanup DAG that for the concrete dag generated for the workflow.
|
DEFAULT_MEGADAG_MODE | final public static String DEFAULT_MEGADAG_MODE(Code) | | The default megadag mode that is used for generation of megadags in
deferred planning.
|
SUBMIT_DIRECTORY_PREFIX | final public static String SUBMIT_DIRECTORY_PREFIX(Code) | | The prefix for the submit directory.
|
CPlanner | public CPlanner()(Code) | | Default constructor.
|
createSubmitDirectory | protected String createSubmitDirectory(ADag dag, String dir, String user, String vogroup, boolean timestampBased) throws IOException(Code) | | Creates the submit directory for the workflow. This is not thread safe.
Parameters: dag - the workflow being worked upon. Parameters: dir - the base directory specified by the user. Parameters: user - the username of the user. Parameters: vogroup - the vogroup to which the user belongs to. Parameters: timestampBased - boolean indicating whether to have a timestamp based dir or not the directory name created relative to the base directory passedas input. throws: IOException - in case of unable to create submit directory. |
createSubmitDirectory | protected String createSubmitDirectory(String label, String dir, String user, String vogroup, boolean timestampBased) throws IOException(Code) | | Creates the submit directory for the workflow. This is not thread safe.
Parameters: label - the label of the workflow Parameters: dir - the base directory specified by the user. Parameters: user - the username of the user. Parameters: vogroup - the vogroup to which the user belongs to. Parameters: timestampBased - boolean indicating whether to have a timestamp based dir or not the directory name created relative to the base directory passedas input. throws: IOException - in case of unable to create submit directory. |
doPartitionAndPlan | protected void doPartitionAndPlan(PegasusProperties properties, PlannerOptions options)(Code) | | Partitions and plans the workflow. First step of merging DAGMan and
Condor
Parameters: properties - the properties passed to the planner. Parameters: options - the options passed to the planner. |
executeCommand | public void executeCommand(String[] args)(Code) | | Executes the command on the basis of the options specified.
Parameters: args - the command line options. |
executeCommand | public void executeCommand(PlannerOptions options)(Code) | | Executes the command on the basis of the options specified.
Parameters: options - the command line options. |
generateValidOptions | public LongOpt[] generateValidOptions()(Code) | | Tt generates the LongOpt which contain the valid options that the command
will accept.
array of LongOpt objects , corresponding to the validoptions |
getRandomDirectory | protected String getRandomDirectory(ADag dag)(Code) | | Sets the basename of the random directory that is created on the remote
sites per workflow. The name is generated by default from teh flow ID,
unless a basename prefix is specifed at runtime in the planner options.
Parameters: dag - the DAG containing the abstract workflow. the basename of the random directory. |
loadProperties | public void loadProperties()(Code) | | Loads all the properties that are needed by this class.
|
logEntryInWorkCatalog | protected boolean logEntryInWorkCatalog(ADag dag, String baseDir, String relativeDir)(Code) | | Logs an entry in the work catalog about the workflow being planned.
Parameters: dag - ADag Parameters: baseDir - String Parameters: relativeDir - String boolean |
main | public static void main(String[] args)(Code) | | The main program for the CPlanner.
Parameters: args - the main arguments passed to the planner. |
parseCommandLineArguments | public PlannerOptions parseCommandLineArguments(String[] args)(Code) | | Parses the command line arguments using GetOpt and returns a
PlannerOptions contains all the options passed by the
user at the command line.
Parameters: args - the arguments passed by the user at command line. the options. |
printLongVersion | public void printLongVersion()(Code) | | Prints the long description, displaying in detail what the various options
to the command stand for.
|
printShortVersion | public void printShortVersion()(Code) | | Prints out a short description of what the command does.
|
sanityCheck | protected static void sanityCheck(File dir) throws IOException(Code) | | Checks the destination location for existence, if it can
be created, if it is writable etc.
Parameters: dir - is the new base directory to optionally create. throws: IOException - in case of error while writing out files. |
submitWorkflow | public boolean submitWorkflow(String invocation)(Code) | | Submits the workflow for execution using pegasus-run, a wrapper around
pegasus-submit-dag.
Parameters: invocation - the pegasus run invocation boolean indicating whether could successfully submit the workflow or not. |
writeOutMetrics | protected boolean writeOutMetrics(PlannerMetrics pm)(Code) | | Writes out the planner metrics to the global log.
Parameters: pm - the metrics to be written out. boolean |
|
|