public class ResourceClass extends Object implements SchedConstants
SchedConstants.EvictionPolicy, SchedConstants.PolicyCOMPONENT_NAME, DEFAULT_INIT_STABILITY_COUNT, DEFAULT_INSTANCES, DEFAULT_MAX_INSTANCES, DEFAULT_MAX_PROCESSES, DEFAULT_NODE_METRICS_RATE, DEFAULT_OR_PUBLISH_RATE, DEFAULT_PRIORITY, DEFAULT_PROCESSES, DEFAULT_RM_PUBLISHING_SLOP, DEFAULT_SCHEDULING_RATE, DEFAULT_SCHEDULING_RATIO, DEFAULT_SHARE_WEIGHT, DEFAULT_STABILITY_COUNT| Constructor and Description |
|---|
ResourceClass(org.apache.uima.ducc.common.utils.DuccProperties props,
long share_quantum) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allotmentExceeded(IRmJob j)
Does this job push the per-user allotment over the top?
Note that we don't store current occupancy directly, we always calculate it from the
jobs assigned to the class.
|
boolean |
authorized(String user) |
int |
calculateCap() |
boolean |
canUseBonus(int order)
Can I use more 1 more share of this size? This is more complex than for Users and Jobs because
in addition to checking if my request is filled, we need to make sure the underlying nodepools
can support the bonus.
|
void |
clearShares() |
boolean |
enforceMemory() |
boolean |
fairShareCapExceeded(IRmJob j) |
int |
getAllotment(IRmJob j) |
Comparator<org.apache.uima.ducc.rm.scheduler.IEntity> |
getApportionmentSorter() |
static String |
getDashes() |
int |
getEffectiveWeight(int order)
Return my share weight, if I have any jobs of the given order or less.
|
int[] |
getGivenByOrder() |
static String |
getHeader() |
int |
getInitializationCap() |
String |
getName()
public String getId()
{
return id;
}
|
org.apache.uima.ducc.rm.scheduler.NodePool |
getNodepool() |
SchedConstants.Policy |
getPolicy() |
long |
getPredictionFudge() |
int |
getPriority() |
int |
getPureFairShare() |
int |
getShareWeight() |
long |
getTimestamp() |
int |
getTrueCap() |
int[] |
getWantedByOrder() |
int |
hashCode() |
boolean |
hasSharesGiven() |
void |
initWantedByOrder(ResourceClass unused) |
boolean |
isExpandByDoubling() |
boolean |
isUsePrediction() |
void |
setExpandByDoubling(boolean ebd) |
void |
setGivenByOrder(int[] gbo) |
void |
setInitializationCap(int c) |
void |
setNodepool(org.apache.uima.ducc.rm.scheduler.NodePool np) |
void |
setPureFairShare(int pfs) |
void |
setTrueCap(int cap) |
String |
toString() |
String |
toStringWithHeader() |
public ResourceClass(org.apache.uima.ducc.common.utils.DuccProperties props,
long share_quantum)
public boolean authorized(String user)
public void setNodepool(org.apache.uima.ducc.rm.scheduler.NodePool np)
public org.apache.uima.ducc.rm.scheduler.NodePool getNodepool()
public long getTimestamp()
public void setPureFairShare(int pfs)
public int getPureFairShare()
public boolean isExpandByDoubling()
public void setExpandByDoubling(boolean ebd)
public int getInitializationCap()
public void setInitializationCap(int c)
public boolean isUsePrediction()
public long getPredictionFudge()
public boolean enforceMemory()
public SchedConstants.Policy getPolicy()
public void setTrueCap(int cap)
public int getTrueCap()
public int getAllotment(IRmJob j)
public String getName()
public int getShareWeight()
public boolean allotmentExceeded(IRmJob j)
public boolean fairShareCapExceeded(IRmJob j)
public int getEffectiveWeight(int order)
public boolean canUseBonus(int order)
order - The size of the available share. Must be an exact match because the
offerer has already done all reasonable splitting and will have a better
use for it if I can't take it.
The decision is based on the wbo/gbo arrays that the offer has been building up
just before asking this question.public int getPriority()
public void clearShares()
public void initWantedByOrder(ResourceClass unused)
public int[] getWantedByOrder()
public int[] getGivenByOrder()
public void setGivenByOrder(int[] gbo)
public int calculateCap()
public boolean hasSharesGiven()
public static String getDashes()
public static String getHeader()
public String toStringWithHeader()
public Comparator<org.apache.uima.ducc.rm.scheduler.IEntity> getApportionmentSorter()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.