Class HeftBag
java.lang.Object
edu.isi.pegasus.planner.selector.site.heft.HeftBag
- All Implemented Interfaces:
edu.isi.pegasus.planner.partitioner.graph.Bag
A data class that implements the Bag interface and stores the extra information that is required
by the HEFT algorithm for each node.
- Version:
- $Revision$
- Author:
- Karan Vahi
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerThe constant to be passed to the accessor functions to get or set the actual end time for a job.static final IntegerThe constant to be passed to the accessor functions to get or set the actual start time for a job.static final IntegerThe constant to be passed to the accessor functions to get or set the average compute time for the node.static final IntegerThe constant to be passed to the accessor functions to get or set the downward rank for a node.static final String[]Array storing the names of the attributes that are stored with the site.private floatThe average compute time for a node.private floatThe downward rank for a node.private longThe estimated end time for a job.private StringThe site where a job is scheduled to run.private longThe estimated start time for a job.private floatThe upward rank for a node.static final IntegerThe site where the job is scheduled.static final IntegerThe constant to be passed to the accessor functions to get or set the upward rank for a node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds an object to the underlying bag corresponding to a particular key.booleancontainsKey(Object key) Returns true if the namespace contains a mapping for the specified key.Returns an objects corresponding to the key passed.private intgetIntValue(Object key) A convenience method to get the intValue for the object passed.
-
Field Details
-
HEFTINFO
Array storing the names of the attributes that are stored with the site. -
AVG_COMPUTE_TIME
The constant to be passed to the accessor functions to get or set the average compute time for the node. -
DOWNWARD_RANK
The constant to be passed to the accessor functions to get or set the downward rank for a node. -
UPWARD_RANK
The constant to be passed to the accessor functions to get or set the upward rank for a node. -
ACTUAL_START_TIME
The constant to be passed to the accessor functions to get or set the actual start time for a job. -
ACTUAL_FINISH_TIME
The constant to be passed to the accessor functions to get or set the actual end time for a job. -
SCHEDULED_SITE
The site where the job is scheduled. -
mAvgComputeTime
private float mAvgComputeTimeThe average compute time for a node. -
mDownwardRank
private float mDownwardRankThe downward rank for a node. -
mUpwardRank
private float mUpwardRankThe upward rank for a node. -
mStartTime
private long mStartTimeThe estimated start time for a job. -
mEndTime
private long mEndTimeThe estimated end time for a job. -
mScheduledSite
The site where a job is scheduled to run.
-
-
Constructor Details
-
HeftBag
public HeftBag()The default constructor.
-
-
Method Details
-
add
Adds an object to the underlying bag corresponding to a particular key.- Specified by:
addin interfaceedu.isi.pegasus.planner.partitioner.graph.Bag- Parameters:
key- the key with which the value has to be associated.value- the value to be associated with the key.- Returns:
- boolean indicating if insertion was successful.
-
containsKey
Returns true if the namespace contains a mapping for the specified key.- Specified by:
containsKeyin interfaceedu.isi.pegasus.planner.partitioner.graph.Bag- Parameters:
key- The key that you want to search for in the bag.- Returns:
- boolean
-
get
Returns an objects corresponding to the key passed.- Specified by:
getin interfaceedu.isi.pegasus.planner.partitioner.graph.Bag- Parameters:
key- the key corresponding to which the objects need to be returned.- Returns:
- the object that is found corresponding to the key or null.
-
getIntValue
A convenience method to get the intValue for the object passed.- Parameters:
key- the key to be converted- Returns:
- the int value if object an integer, else -1
-