|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.refiner.Engine
edu.isi.pegasus.planner.refiner.RemoveDirectory
public class RemoveDirectory
Ends up creating a cleanup dag that deletes the remote directories that were created by the create dir jobs. The cleanup dag is generated in a sub directory from the main directory containing the submit files of the dag. The dag consists of independant jobs, with each job responsible for deleting directory for a execution pool. The current way of generating the dag is tied to the fact, that the directories in which a job are executed is tied to the pool not the job itself.
CreateDirectory| Field Summary | |
|---|---|
static String |
CLEANUP_DAG_PREFIX
The prefix that is attached to the name of the dag for which the cleanup Dag is being generated, to generate the name of the cleanup Dag. |
static String |
DERIVATION_NAME
The logical name of the transformation that removes directories on the remote execution pools. |
static String |
DERIVATION_NAMESPACE
The derivation namespace for the create dir jobs. |
static String |
DERIVATION_VERSION
The version number for the derivations for create dir jobs. |
static String |
FILE_URL_SCHEME
The scheme name for file url. |
private ADag |
mConcDag
The concrete dag so far, for which the clean up dag needs to be generated. |
private String |
mSubmitDirectory
The submit directory for the workflow. |
private boolean |
mTransferFromSubmitHost
Boolean indicating whether we need to transfer dirmanager from the submit host. |
static String |
REMOVE_DIR_EXECUTABLE_BASENAME
The basename of the pegasus dirmanager executable. |
static String |
REMOVE_DIR_SUFFIX
Constant suffix for the names of the remote directory nodes. |
static String |
TRANSFORMATION_NAME
The logical name of the transformation that removes directories on the remote execution pools. |
static String |
TRANSFORMATION_NAMESPACE
The transformation namespace for the create dir jobs. |
static String |
TRANSFORMATION_VERSION
The version number for the derivations for create dir jobs. |
| Fields inherited from class edu.isi.pegasus.planner.refiner.Engine |
|---|
mBag, mLogger, mLogMsg, mOutputPool, mPoolFile, mPOptions, mProps, mRLIUrl, mSiteStore, mTCFile, mTCHandle, mTCMode, REGISTRATION_UNIVERSE, TRANSFER_UNIVERSE |
| Constructor Summary | |
|---|---|
RemoveDirectory(ADag concDag,
PegasusBag bag,
String submitDirectory)
The overloaded constructor that sets the dag for which we have to generated the cleanup dag for. |
|
| Method Summary | |
|---|---|
private TransformationCatalogEntry |
defaultTCEntry(SiteCatalogEntry site)
Returns a default TC entry to be used in case entry is not found in the transformation catalog. |
ADag |
generateCleanUPDAG()
Generates a cleanup DAG for the dag associated with the class. |
ADag |
generateCleanUPDAG(ADag dag)
Generates a cleanup DAG for the dag object passed. |
static String |
getCompleteTranformationName()
A convenience method to return the complete transformation name being used to construct jobs in this class. |
protected Set |
getCreateDirSites(ADag dag)
Retrieves the sites for which the create dir jobs need to be created. |
private String |
getRemoveDirJobName(ADag dag,
String pool)
It returns the name of the remove directory job, that is to be assigned. |
Job |
makeRemoveDirJob(String site,
String jobName)
It creates a remove directory job that creates a directory on the remote pool using the perl executable that Gaurang wrote. |
Job |
makeRemoveDirJob(String site,
String jobName,
List<String> files)
It creates a remove directory job that creates a directory on the remote pool using the perl executable that Gaurang wrote. |
| Methods inherited from class edu.isi.pegasus.planner.refiner.Engine |
|---|
addVector, appendArrayList, loadProperties, printVector, stringInList, stringInPegVector, stringInVector, vectorToString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_URL_SCHEME
public static final String CLEANUP_DAG_PREFIX
public static final String REMOVE_DIR_SUFFIX
public static final String TRANSFORMATION_NAME
public static final String REMOVE_DIR_EXECUTABLE_BASENAME
public static final String TRANSFORMATION_NAMESPACE
public static final String TRANSFORMATION_VERSION
public static final String DERIVATION_NAMESPACE
public static final String DERIVATION_NAME
public static final String DERIVATION_VERSION
private ADag mConcDag
private boolean mTransferFromSubmitHost
private String mSubmitDirectory
| Constructor Detail |
|---|
public RemoveDirectory(ADag concDag,
PegasusBag bag,
String submitDirectory)
concDag - the concrete dag for which cleanup is reqd.bag - the bag of initialization objectssubmitDirectory - the submit directory for the cleanup workflow| Method Detail |
|---|
public static String getCompleteTranformationName()
public ADag generateCleanUPDAG()
public ADag generateCleanUPDAG(ADag dag)
dag - the dag for which cleanup dag needs to be generated.
org.griphyn.cPlanner.classes.ADag#getExecutionSites()protected Set getCreateDirSites(ADag dag)
private String getRemoveDirJobName(ADag dag,
String pool)
dag - the dag for which the cleanup DAG is being generated.pool - the execution pool for which the remove directory job
is responsible.
public Job makeRemoveDirJob(String site,
String jobName)
site - the execution pool for which the create dir job is to be
created.jobName - the name that is to be assigned to the job.
public Job makeRemoveDirJob(String site,
String jobName,
List<String> files)
site - the site from where the directory need to be removed.jobName - the name that is to be assigned to the job.files - the list of files to be cleaned up.
private TransformationCatalogEntry defaultTCEntry(SiteCatalogEntry site)
site - the SiteCatalogEntry for the site for which the default entry is required.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||