public class ReductionEngine extends Engine implements Refiner
Modifier and Type | Field and Description |
---|---|
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.
|
mBag, mLogger, mLogMsg, mOutputPool, mPoolFile, mPOptions, mProps, mRLIUrl, mSiteStore, mTCFile, mTCHandle, mTCMode, REGISTRATION_UNIVERSE, TRANSFER_UNIVERSE
Constructor and Description |
---|
ReductionEngine(ADag orgDag,
PegasusBag bag)
The constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
addVector, appendArrayList, loadProperties, printVector, stringInList, stringInPegVector, stringInVector, vectorToString
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
public ReductionEngine(ADag orgDag, PegasusBag bag)
orgDag
- The original Dag objectbag
- the bag of initialization objects.public ADag getWorkflow()
getWorkflow
in interface Refiner
public XMLProducer getXMLProducer()
getXMLProducer
in interface Refiner
public 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 Catalogorg.griphyn.cPlanner.classes.Job
private 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 deletedprivate 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 CatalogCopyright © 2011 The University of Southern California. All Rights Reserved.