|
||||||||||
| 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.ReductionEngine
public class ReductionEngine
Reduction engine for Planner 2. Given a ADAG it looks up the replica catalog and determines which output files are in the Replica Catalog, and on the basis of these ends up reducing the dag.
| Field Summary | |
|---|---|
private Vector |
mAddJobsDeleted
the jobs which are deleted due to the application of the Reduction algorithm. |
private Vector |
mAllDeletedJobs
all deleted jobs. |
private Set |
mFilesInRC
the files whose locations are returned from the ReplicaCatalog |
private Vector |
mOrgDagRelations
the dag relations of the orginal dag |
private Vector |
mOrgJobsInRC
the jobs which are found to be in the Replica Catalog. |
private ADag |
mOriginalDag
the original dag object which needs to be reduced on the basis of the results returned from the Replica Catalog |
private ADag |
mReducedDag
the reduced dag object which is returned. |
private ADag |
mWorkflow
The workflow object being worked upon. |
private XMLProducer |
mXMLStore
The XML Producer object that records the actions. |
| 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 |
| Fields inherited from interface edu.isi.pegasus.planner.refiner.Refiner |
|---|
VERSION |
| Constructor Summary | |
|---|---|
ReductionEngine(ADag orgDag,
PegasusBag bag)
The constructor |
|
| Method Summary | |
|---|---|
private DagInfo |
constructNewDagInfo(DagInfo dagInfo,
Vector vDelJobs)
Constructs a DagInfo object for the decomposed Dag on the basis of the jobs which are deleted from the DAG by the reduction algorithm Note : We are plainly copying the inputFiles and the outputFiles. |
private Vector |
constructNewSubInfos(Vector vSubInfos,
Vector vDelJobs)
constructs the Vector of subInfo objects corresponding to the reduced ADAG. |
private void |
firstPass(Vector vDelJobs)
If a job is deleted it marks all the relations related to that job as deleted |
private Vector |
getChildren(String node)
Gets all the children of a particular node. |
List<Job> |
getDeletedJobs()
This returns all the jobs deleted from the workflow after the reduction algorithm has run. |
List<Job> |
getDeletedLeafJobs()
This returns all the deleted jobs that happen to be leaf nodes. |
private Vector |
getJobsInRC(Vector vSubInfos,
Set filesInRC)
This determines the jobs which are in the RC corresponding to the files found in the Replica Catalog. |
private Vector |
getNodeParents(String node)
Gets all the parents of a particular node. |
ADag |
getWorkflow()
Returns a reference to the workflow that is being refined by the refiner. |
XMLProducer |
getXMLProducer()
Returns a reference to the XMLProducer, that generates the XML fragment capturing the actions of the refiner. |
ADag |
makeRedDagObject(ADag orgDag,
Vector vDelJobs)
makes the Reduced Dag object which corresponding to the deleted jobs which are specified. |
ADag |
reduceDag(ReplicaCatalogBridge rcb)
Reduces the workflow on the basis of the existence of lfn's in the replica catalog. |
private void |
secondPass()
In the second pass we find all the parents of the nodes which have been found to be in the RC. |
| 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 |
|---|
private ADag mOriginalDag
private Vector mOrgDagRelations
private ADag mReducedDag
private Vector mOrgJobsInRC
private Vector mAddJobsDeleted
private Vector mAllDeletedJobs
private Set mFilesInRC
private XMLProducer mXMLStore
private ADag mWorkflow
| Constructor Detail |
|---|
public ReductionEngine(ADag orgDag,
PegasusBag bag)
orgDag - The original Dag objectbag - the bag of initialization objects.| Method Detail |
|---|
public ADag getWorkflow()
getWorkflow in interface Refinerpublic XMLProducer getXMLProducer()
getXMLProducer in interface Refinerpublic ADag reduceDag(ReplicaCatalogBridge rcb)
rcb - instance of the replica catalog bridge.
private Vector getJobsInRC(Vector vSubInfos,
Set filesInRC)
vSubInfos - Vector of Job
objects corresponding to all
the jobs of a Abstract DagfilesInRC - Set of String
objects corresponding to the
logical filenames of files
which are found to be in the
Replica Catalog
org.griphyn.cPlanner.classes.Jobprivate void firstPass(Vector vDelJobs)
vDelJobs - the vector containing the names
of the deleted jobs whose relations
we want to nullifyprivate void secondPass()
private Vector getNodeParents(String node)
node - the name of the job whose parents are to be found.
private Vector getChildren(String node)
node - the name of the node whose children we want to find.
public List<Job> getDeletedJobs()
Job of deleted leaf jobs.public List<Job> getDeletedLeafJobs()
Job of deleted leaf jobs.
public ADag makeRedDagObject(ADag orgDag,
Vector vDelJobs)
orgDag - the original DagvDelJobs - the Vector containing the
names of the jobs whose
SubInfos and Relations we
want to remove.
private DagInfo constructNewDagInfo(DagInfo dagInfo,
Vector vDelJobs)
dagInfo - the object which is reduced on
the basis of vDelJobsvDelJobs - Vector containing the logical file
names of jobs which are to
be deleted
private Vector constructNewSubInfos(Vector vSubInfos,
Vector vDelJobs)
vSubInfos - the Job object including
the jobs which are not needed
after the execution of the
reduction algorithmvDelJobs - the jobs which are deleted by
the reduction algo as their
output files are in the Replica Catalog
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||