org.apache.uima.ducc.rm.scheduler
Class ResourceClass
java.lang.Object
org.apache.uima.ducc.rm.scheduler.ResourceClass
- All Implemented Interfaces:
- SchedConstants
public class ResourceClass
- extends Object
- implements SchedConstants
This represents a priority class.
| Fields inherited from interface org.apache.uima.ducc.rm.scheduler.SchedConstants |
COMPONENT_NAME, DEFAULT_INIT_STABILITY_COUNT, DEFAULT_INSTANCES, DEFAULT_MAX_INSTANCES, DEFAULT_MAX_PROCESSES, DEFAULT_NODE_METRICS_RATE, DEFAULT_PRIORITY, DEFAULT_PROCESSES, DEFAULT_SCHEDULING_RATE, DEFAULT_SCHEDULING_RATIO, DEFAULT_SHARE_WEIGHT, DEFAULT_STABILITY_COUNT |
|
Constructor Summary |
ResourceClass(org.apache.uima.ducc.common.utils.DuccProperties props)
|
ResourceClass
public ResourceClass(org.apache.uima.ducc.common.utils.DuccProperties props)
getTimestamp
public long getTimestamp()
setPureFairShare
public void setPureFairShare(int pfs)
getPureFairShare
public int getPureFairShare()
isExpandByDoubling
public boolean isExpandByDoubling()
setExpandByDoubling
public void setExpandByDoubling(boolean ebd)
getInitializationCap
public int getInitializationCap()
setInitializationCap
public void setInitializationCap(int c)
isUsePrediction
public boolean isUsePrediction()
getPredictionFudge
public long getPredictionFudge()
enforceMemory
public boolean enforceMemory()
getPolicy
public SchedConstants.Policy getPolicy()
setTrueCap
public void setTrueCap(int cap)
getTrueCap
public int getTrueCap()
getPercentCap
public double getPercentCap()
getAbsoluteCap
public int getAbsoluteCap()
getMaxProcesses
public int getMaxProcesses()
getMinShares
public int getMinShares()
getMaxMachines
public int getMaxMachines()
getName
public String getName()
- public String getId()
{
return id;
}
getShareWeight
public int getShareWeight()
getEffectiveWeight
public int getEffectiveWeight(int order)
- Return my share weight, if I have any jobs of the given order or less. If not,
return 0;
getPriority
public int getPriority()
clearShares
public void clearShares()
markSubpoolCounted
public void markSubpoolCounted()
initWantedByOrder
public void initWantedByOrder(ResourceClass unused)
getWantedByOrder
public int[] getWantedByOrder()
getGivenByOrder
public int[] getGivenByOrder()
setGivenByOrder
public void setGivenByOrder(int[] gbo)
calculateCap
public int calculateCap(int order,
int basis)
hasSharesGiven
public boolean hasSharesGiven()
- int[] getSharesByOrder(int asize)
{
int[] answer = new int[asize];
for ( int i = 0; i < asize; i++ ) {
if ( nSharesByOrder.containsKey(i) ) {
answer[i] = nSharesByOrder.get(i);
} else {
answer[i] = 0;
}
}
return answer;
}
getDashes
public static String getDashes()
getHeader
public static String getHeader()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
toStringWithHeader
public String toStringWithHeader()
getApportionmentSorter
public Comparator<org.apache.uima.ducc.rm.scheduler.IEntity> getApportionmentSorter()
Copyright © 2012–2014 The Apache Software Foundation. All rights reserved.