edu.isi.pegasus.planner.partitioner
Class Label

java.lang.Object
  extended by edu.isi.pegasus.planner.partitioner.Partitioner
      extended by edu.isi.pegasus.planner.partitioner.Label

public class Label
extends Partitioner

This partitioner partitions the DAX into smaller partitions as specified by the labels associated with the jobs. If no label is specified, then the partitioner puts the job into a unique partition corresponding to the job ID.

Version:
$Revision: 2576 $
Author:
Karan Vahi

Field Summary
static String DESCRIPTION
          A short description about the partitioner.
private  LogManager mLogger
          The handle to the Logging object.
private  Map mPartitionMap
          A map indexed by the label.
private  LinkedList mQueue
          The first in first out queue, that manages the set of gray vertices in a breadth first search.
 
Fields inherited from class edu.isi.pegasus.planner.partitioner.Partitioner
mGraph, mProps, mRoot, PACKAGE_NAME, VERSION
 
Constructor Summary
Label(GraphNode root, Map graph, PegasusProperties properties)
          The overloaded constructor.
 
Method Summary
 String description()
          Returns a textual description of the transfer implementation.
 void determinePartitions(Callback c)
          Partitions the graph passed in the constructor, on the basis of the labels associated with the nodes in the graph.
private  String getLabel(GraphNode node)
          Returns the label for the node.
private  String getPartitionID(int id)
          Constructs the id for the partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION

public static final String DESCRIPTION
A short description about the partitioner.

See Also:
Constant Field Values

mPartitionMap

private Map mPartitionMap
A map indexed by the label. Each value is a partition object consisting of jobs with that label.


mQueue

private LinkedList mQueue
The first in first out queue, that manages the set of gray vertices in a breadth first search.


mLogger

private LogManager mLogger
The handle to the Logging object.

Constructor Detail

Label

public Label(GraphNode root,
             Map graph,
             PegasusProperties properties)
The overloaded constructor.

Parameters:
root - the dummy root node of the graph.
graph - the map containing all the nodes of the graph keyed by the logical id of the nodes.
properties - the properties passed to the planner.
Method Detail

determinePartitions

public void determinePartitions(Callback c)
Partitions the graph passed in the constructor, on the basis of the labels associated with the nodes in the graph. All the nodes, with the same label are deemed to be in the same partition.

Specified by:
determinePartitions in class Partitioner
Parameters:
c - the callback for the partitioner.

description

public String description()
Returns a textual description of the transfer implementation.

Specified by:
description in class Partitioner
Returns:
a short textual description

getLabel

private String getLabel(GraphNode node)
Returns the label for the node. If no label is associated with the node, then the ID of the node is assumed as the label.

Parameters:
node - the node for which the label is required.
Returns:
the label associated with the job, else the id of the node.

getPartitionID

private String getPartitionID(int id)
Constructs the id for the partition.

Parameters:
id - the integer id.
Returns:
the ID of the partition.


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