public class RemoveDirectory extends Engine
CreateDirectory
Modifier and Type | Field and Description |
---|---|
static java.lang.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 java.lang.String |
CLEANUP_PREFIX
Constant suffix for the names of the deployment nodes.
|
static java.lang.String |
DERIVATION_NAME
The logical name of the transformation that removes directories on the
remote execution pools.
|
static java.lang.String |
DERIVATION_NAMESPACE
The derivation namespace for the create dir jobs.
|
static java.lang.String |
DERIVATION_VERSION
The version number for the derivations for create dir jobs.
|
private ADag |
mConcDag
The concrete dag so far, for which the clean up dag needs to be generated.
|
protected java.lang.String |
mJobPrefix
The job prefix that needs to be applied to the job file basenames.
|
private java.lang.String |
mSubmitDirectory
The submit directory for the workflow.
|
private boolean |
mTransferFromSubmitHost
Boolean indicating whether we need to transfer dirmanager from the submit
host.
|
static java.lang.String |
REMOVE_DIR_EXECUTABLE_BASENAME
The basename of the pegasus dirmanager executable.
|
static java.lang.String |
REMOVE_DIR_SUFFIX
Constant suffix for the names of the remote directory nodes.
|
static java.lang.String |
TRANSFORMATION_NAME
The logical name of the transformation that removes directories on the
remote execution pools.
|
static java.lang.String |
TRANSFORMATION_NAMESPACE
The transformation namespace for the create dir jobs.
|
static java.lang.String |
TRANSFORMATION_VERSION
The version number for the derivations for create dir jobs.
|
mBag, mLogger, mLogMsg, mOutputPool, mPoolFile, mPOptions, mProps, mRLIUrl, mSiteStore, mTCFile, mTCHandle, mTCMode, REGISTRATION_UNIVERSE, TRANSFER_UNIVERSE
Constructor and Description |
---|
RemoveDirectory(ADag concDag,
PegasusBag bag,
java.lang.String submitDirectory)
The overloaded constructor that sets the dag for which we have to
generated the cleanup dag for.
|
Modifier and Type | Method and Description |
---|---|
ADag |
addRemoveDirectoryNodes(ADag dag)
Modifies the workflow to add remove directory nodes.
|
ADag |
addRemoveDirectoryNodes(ADag workflow,
java.util.Set<java.lang.String> sites)
Adds create dir nodes to the workflow.
|
private TransformationCatalogEntry |
defaultTCEntry(SiteCatalogEntry site)
Returns a default TC entry to be used in case entry is not found in the
transformation catalog.
|
private java.lang.String |
getAssociatedCreateDirSite(Job job)
Returns the associated site that job is dependant on.
|
static java.lang.String |
getCompleteTranformationName()
A convenience method to return the complete transformation name being
used to construct jobs in this class.
|
protected java.util.Set |
getCreateDirSites(ADag dag)
Retrieves the sites for which the create dir jobs need to be created.
|
private java.lang.String |
getRemoveDirJobName(ADag dag,
java.lang.String site)
It returns the name of the remove directory job, that is to be assigned.
|
Job |
makeRemoveDirJob(java.lang.String site,
java.lang.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(java.lang.String site,
java.lang.String jobName,
java.util.List<java.lang.String> files)
It creates a remove directory job that creates a directory on the remote pool
using the perl executable that Gaurang wrote.
|
addVector, appendArrayList, complainForHeadNodeURLPrefix, complainForHeadNodeURLPrefix, loadProperties, printVector, stringInList, stringInPegVector, stringInVector, vectorToString
public static final java.lang.String CLEANUP_DAG_PREFIX
public static final java.lang.String REMOVE_DIR_SUFFIX
public static final java.lang.String TRANSFORMATION_NAME
public static final java.lang.String REMOVE_DIR_EXECUTABLE_BASENAME
public static final java.lang.String TRANSFORMATION_NAMESPACE
public static final java.lang.String TRANSFORMATION_VERSION
public static final java.lang.String DERIVATION_NAMESPACE
public static final java.lang.String DERIVATION_NAME
public static final java.lang.String DERIVATION_VERSION
public static final java.lang.String CLEANUP_PREFIX
private ADag mConcDag
private boolean mTransferFromSubmitHost
private java.lang.String mSubmitDirectory
protected java.lang.String mJobPrefix
public RemoveDirectory(ADag concDag, PegasusBag bag, java.lang.String submitDirectory)
concDag
- the concrete dag for which cleanup is reqd.bag
- the bag of initialization objectssubmitDirectory
- the submit directory for the cleanup workflowpublic static java.lang.String getCompleteTranformationName()
public ADag addRemoveDirectoryNodes(ADag dag)
dag
- the workflow to which the nodes have to be added.public ADag addRemoveDirectoryNodes(ADag workflow, java.util.Set<java.lang.String> sites)
workflow
- the workflowsites
- the staging sites the workflow refers to.protected java.util.Set getCreateDirSites(ADag dag)
private java.lang.String getRemoveDirJobName(ADag dag, java.lang.String site)
dag
- the dag for which the cleanup DAG is being generated.site
- the execution site for which the remove directory job
is responsible.public Job makeRemoveDirJob(java.lang.String site, java.lang.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(java.lang.String site, java.lang.String jobName, java.util.List<java.lang.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.private java.lang.String getAssociatedCreateDirSite(Job job)
job
- the job for which we need the associated create dir site.