public class LabelManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LabelManager.LabelApplicabilityStatus |
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_RELOAD_INTERVAL |
static String |
NODE_LABELS_FILE |
static String |
NODE_LABELS_MONITOR_INTERVAL |
Modifier and Type | Method and Description |
---|---|
net.java.dev.eval.Expression |
constructAppLabel(Queue.QueueLabelPolicy policy,
net.java.dev.eval.Expression appLabelExpression,
net.java.dev.eval.Expression queueLabelExpression) |
net.java.dev.eval.Expression |
getEffectiveLabelExpr(String appLabelStr) |
static LabelManager |
getInstance() |
org.apache.hadoop.fs.Path |
getLabelFile() |
List<org.apache.hadoop.yarn.api.records.NodeToLabelsList> |
getLabelsForAllNodes() |
Set<String> |
getLabelsForNode(String node) |
LabelManager.LabelApplicabilityStatus |
isNodeApplicableForApp(String node,
net.java.dev.eval.Expression finalAppLabelExp) |
boolean |
isServiceEnabled() |
void |
refreshLabels()
Read a line from file and parse node identifier and labels.
|
public static final String NODE_LABELS_FILE
public static final String NODE_LABELS_MONITOR_INTERVAL
public static final long DEFAULT_RELOAD_INTERVAL
public static LabelManager getInstance()
public boolean isServiceEnabled()
@InterfaceAudience.Private public void refreshLabels() throws IOException
IOException
public List<org.apache.hadoop.yarn.api.records.NodeToLabelsList> getLabelsForAllNodes()
public net.java.dev.eval.Expression getEffectiveLabelExpr(String appLabelStr) throws IOException
IOException
public net.java.dev.eval.Expression constructAppLabel(Queue.QueueLabelPolicy policy, net.java.dev.eval.Expression appLabelExpression, net.java.dev.eval.Expression queueLabelExpression)
public LabelManager.LabelApplicabilityStatus isNodeApplicableForApp(String node, net.java.dev.eval.Expression finalAppLabelExp) throws IOException
IOException
public org.apache.hadoop.fs.Path getLabelFile()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.