|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.refiner.cleanup.InPlace
public class InPlace
This generates cleanup jobs in the workflow itself.
| Field Summary | |
|---|---|
static String |
CLEANUP_JOB_PREFIX
The prefix for CLEANUP_JOB ID i.e prefix+the parent compute_job ID becomes ID of the cleanup job. |
private HashSet |
mDoNotClean
HashSet of Files that should not be cleaned up |
private CleanupImplementation |
mImpl
The handle to the CleanupImplementation instance that creates the jobs for us. |
private LogManager |
mLogger
The handle to the logging object used for logging. |
private int |
mMaxDepth
The max depth of any job in the workflow useful for a priorityQueue implementation in an array |
private PegasusProperties |
mProps
The handle to the properties passed to Pegasus. |
private HashMap |
mResMap
The mapping to siteHandle to all the jobs that are mapped to it mapping to siteHandle(String) to Set |
private HashMap |
mResMapLeaves
The mapping of siteHandle to all subset of the jobs mapped to it that are leaves in the workflow mapping to siteHandle(String) to Set |
private HashMap |
mResMapRoots
The mapping of siteHandle to all subset of the jobs mapped to it that are leaves in the workflow mapping to siteHandle(String) to Set |
| Fields inherited from interface edu.isi.pegasus.planner.refiner.cleanup.CleanupStrategy |
|---|
VERSION |
| Constructor Summary | |
|---|---|
InPlace()
The default constructor. |
|
| Method Summary | |
|---|---|
Graph |
addCleanupJobs(Graph workflow)
Adds cleanup jobs to the workflow. |
private void |
addCleanUpJobs(String site,
Set leaves,
Graph workflow)
Adds cleanup jobs for the workflow scheduled to a particular site a best first search strategy is implemented based on the depth of the job in the workflow |
protected void |
applyJobPriorities(Graph workflow)
Adds job priorities to the jobs in the workflow on the basis of the levels in the traversal order given by the iterator. |
protected String |
generateCleanupID(Job job)
Returns the identifier that is to be assigned to cleanup job. |
protected String |
getSiteForCleanup(Job job)
Returns site to be used for the cleanup algorithm. |
void |
initialize(PegasusBag bag,
CleanupImplementation impl)
Intializes the class. |
protected void |
reset()
Resets the internal data structures. |
private void |
setDepth_ResMap(List roots)
A BFS implementation to set depth value (roots have depth 1) and also to populate mResMap ,mResMapLeaves,mResMapRoots which contains all the jobs that are assigned to a particular resource |
protected boolean |
typeNeedsCleanUp(int type)
Checks to see which job types are required to be looked at for cleanup. |
protected boolean |
typeStageOut(int type)
Checks to see if job type is a stageout job type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLEANUP_JOB_PREFIX
private HashMap mResMap
private HashMap mResMapLeaves
private HashMap mResMapRoots
private int mMaxDepth
private HashSet mDoNotClean
private CleanupImplementation mImpl
private PegasusProperties mProps
private LogManager mLogger
| Constructor Detail |
|---|
public InPlace()
| Method Detail |
|---|
public void initialize(PegasusBag bag,
CleanupImplementation impl)
initialize in interface CleanupStrategybag - bag of initialization objectsimpl - the implementation instance that creates cleanup jobpublic Graph addCleanupJobs(Graph workflow)
addCleanupJobs in interface CleanupStrategyworkflow - the workflow to add cleanup jobs to.
protected void reset()
private void setDepth_ResMap(List roots)
roots - List of GraphNode objects that are roots
private void addCleanUpJobs(String site,
Set leaves,
Graph workflow)
site - the site IDleaves - the leaf jobs that are scheduled to siteworkflow - the Graph into which new cleanup jobs can be addedprotected void applyJobPriorities(Graph workflow)
workflow - the workflow on which to apply job priorities.protected String generateCleanupID(Job job)
job - the job with which the cleanup job is primarily associated.
protected boolean typeNeedsCleanUp(int type)
type - the type of the job.
protected boolean typeStageOut(int type)
type - the type of the job.
protected String getSiteForCleanup(Job job)
job - the job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||