public static enum Variable.Type extends Enum<Variable.Type> implements Variable
Variable.Meta, Variable.Type
Enum Constant and Description |
---|
COLL |
CORE_IDX |
CORES |
DISKTYPE |
FREEDISK |
HEAPUSAGE |
HOST |
IP_1 |
IP_2 |
IP_3 |
IP_4 |
LAZY |
NODE |
NODE_ROLE |
NUMBER |
PORT |
REPLICA |
SHARD |
SYSLOADAVG |
SYSPROP |
TOTALDISK |
WITH_COLLECTION |
Modifier and Type | Field and Description |
---|---|
Boolean |
additive |
Set<String> |
associatedPerNodeValues |
Number |
max |
Variable.Meta |
meta |
String |
metricsAttribute |
Number |
min |
String |
perReplicaValue |
Set<ComputedType> |
supportedComputedTypes |
String |
tagName |
Class |
type |
Set<String> |
vals |
Set<String> |
wildCards |
coreidxsize, NULL
Modifier and Type | Method and Description |
---|---|
boolean |
addViolatingReplicas(org.apache.solr.client.solrj.cloud.autoscaling.Violation.Ctx ctx) |
int |
compareViolation(Violation v1,
Violation v2) |
void |
computeDeviation(Policy.Session session,
double[] deviations,
org.apache.solr.client.solrj.cloud.autoscaling.ReplicaCount replicaCount,
SealedClause sealedClause) |
Object |
computeValue(Policy.Session session,
Condition condition,
String collection,
String shard,
String node)
When a non constant value is used in a variable, the actual value needs to be computed at the runtime
|
Object |
convertVal(Object val) |
Operand |
getOperand(Operand expected,
Object val,
ComputedType computedType) |
void |
getSuggestions(org.apache.solr.client.solrj.cloud.autoscaling.Suggestion.Ctx ctx) |
String |
getTagName() |
boolean |
match(Object inputVal,
Operand op,
Object val,
String name,
Row row) |
String |
postValidate(Condition condition) |
void |
projectAddReplica(Cell cell,
ReplicaInfo ri,
Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector,
boolean strictMode)
Simulate a replica addition to a node in the cluster
|
void |
projectRemoveReplica(Cell cell,
ReplicaInfo ri,
Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector) |
Object |
validate(String name,
Object val,
boolean isRuleVal) |
static Variable.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Variable.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Variable.Type WITH_COLLECTION
public static final Variable.Type COLL
public static final Variable.Type SHARD
public static final Variable.Type REPLICA
public static final Variable.Type PORT
public static final Variable.Type IP_1
public static final Variable.Type IP_2
public static final Variable.Type IP_3
public static final Variable.Type IP_4
public static final Variable.Type FREEDISK
public static final Variable.Type TOTALDISK
public static final Variable.Type CORE_IDX
public static final Variable.Type NODE_ROLE
public static final Variable.Type CORES
public static final Variable.Type SYSLOADAVG
public static final Variable.Type HEAPUSAGE
public static final Variable.Type NUMBER
public static final Variable.Type HOST
public static final Variable.Type SYSPROP
public static final Variable.Type NODE
public static final Variable.Type LAZY
public static final Variable.Type DISKTYPE
public final String tagName
public final Class type
public Variable.Meta meta
public final Number min
public final Number max
public final Boolean additive
public final String perReplicaValue
public final String metricsAttribute
public final Set<ComputedType> supportedComputedTypes
public static Variable.Type[] values()
for (Variable.Type c : Variable.Type.values()) System.out.println(c);
public static Variable.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getTagName()
public void getSuggestions(org.apache.solr.client.solrj.cloud.autoscaling.Suggestion.Ctx ctx)
getSuggestions
in interface Variable
public boolean addViolatingReplicas(org.apache.solr.client.solrj.cloud.autoscaling.Violation.Ctx ctx)
addViolatingReplicas
in interface Variable
public Operand getOperand(Operand expected, Object val, ComputedType computedType)
getOperand
in interface Variable
public Object convertVal(Object val)
convertVal
in interface Variable
public String postValidate(Condition condition)
postValidate
in interface Variable
public void projectAddReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector, boolean strictMode)
projectAddReplica
in interface Variable
public void projectRemoveReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector)
projectRemoveReplica
in interface Variable
public int compareViolation(Violation v1, Violation v2)
compareViolation
in interface Variable
public Object computeValue(Policy.Session session, Condition condition, String collection, String shard, String node)
Variable
computeValue
in interface Variable
public void computeDeviation(Policy.Session session, double[] deviations, org.apache.solr.client.solrj.cloud.autoscaling.ReplicaCount replicaCount, SealedClause sealedClause)
computeDeviation
in interface Variable
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.