edu.isi.pegasus.planner.refiner
Class NodeCollapser

java.lang.Object
  extended by edu.isi.pegasus.planner.refiner.Engine
      extended by edu.isi.pegasus.planner.refiner.NodeCollapser

public class NodeCollapser
extends Engine

This collapses the nodes of the same logical name scheduled on the same pool into fewer fat nodes. The idea behind this is to collapse jobs that take a few seconds to run into a larger job, and hence reducing time because of lesser delays due to lesser number of Condor Globus interactions. Note that the merging of the edges for the jobs being collapsed at present, is not the best implementation. Once the graph structure is correct , it would be modified.

Version:
$Revision: 2590 $
Author:
Karan Vahi vahi@isi.edu, Mei-Hui Su mei@isi.edu

Field Summary
private  PegasusBag mBag
          The bag of initialization objects.
private  String mDirectory
          The directory, where the stdin file of the fat jobs are created.
private  Map mGraph
          The internal map that contains the adjacency list representation of the Graph referred to by the workflow.
protected  LogManager mLogger
          The handle to the logger object.
 
Fields inherited from class edu.isi.pegasus.planner.refiner.Engine
mLogMsg, mOutputPool, mPoolFile, mPOptions, mProps, mRLIUrl, mSiteStore, mTCFile, mTCHandle, mTCMode, REGISTRATION_UNIVERSE, TRANSFER_UNIVERSE
 
Constructor Summary
NodeCollapser(PegasusBag bag)
          The overloaded constructor.
 
Method Summary
 ADag cluster(ADag dag)
          Clusters the jobs in the workflow.
 ADag cluster(ADag dag, String type)
          Clusters the jobs in the workflow.
protected  Map edgeList2Graph(Vector relations, Map nameIDMap)
          Returns an adjacency list representation of the graph referred to by the list of edges.
 void setDirectory(String directory)
          Sets the directory where the stdin files are to be generated.
 
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

mLogger

protected LogManager mLogger
The handle to the logger object.


mDirectory

private String mDirectory
The directory, where the stdin file of the fat jobs are created. It should be the submit file directory that the user mentions at runtime.


mGraph

private Map mGraph
The internal map that contains the adjacency list representation of the Graph referred to by the workflow. This is temporary till the main ADag data structure is corrected.


mBag

private PegasusBag mBag
The bag of initialization objects.

Constructor Detail

NodeCollapser

public NodeCollapser(PegasusBag bag)
The overloaded constructor.

Parameters:
bag - the bag of initialization objects.
Method Detail

setDirectory

public void setDirectory(String directory)
Sets the directory where the stdin files are to be generated.

Parameters:
directory - the path to the directory to which it needs to be set.

cluster

public ADag cluster(ADag dag)
             throws ClustererException
Clusters the jobs in the workflow. It applies a series of clustering actions on the graph, as specified by the user at runtime. For each clustering action, the graph is first partitioned, and then sent to the appropriate clustering module for clustering.

Parameters:
dag - the scheduled dag that has to be clustered.
Returns:
ADag containing the collapsed scheduled workflow.
Throws:
ClustererException - in case of error while clustering

cluster

public ADag cluster(ADag dag,
                    String type)
             throws ClustererException
Clusters the jobs in the workflow. The graph is first partitioned, and then sent to the appropriate clustering module for clustering.

Parameters:
dag - the scheduled dag that has to be clustered.
type - the type of clustering to do.
Returns:
ADag containing the collapsed scheduled workflow.
Throws:
ClustererException - in case of error while clustering

edgeList2Graph

protected Map edgeList2Graph(Vector relations,
                             Map nameIDMap)
Returns an adjacency list representation of the graph referred to by the list of edges. The map contains adjacency list with key as a child and value as the list of parents.

Parameters:
relations - vector of PCRelation objects that does the conversion.
nameIDMap - map with the key as the jobname and value as the logical id
Returns:
Map.


Copyright © 2011 The University of Southern California. All Rights Reserved.