Enum Variable.Type
- java.lang.Object
-
- java.lang.Enum<Variable.Type>
-
- org.apache.solr.client.solrj.cloud.autoscaling.Variable.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Variable.Type>
,Variable
- Enclosing interface:
- Variable
public static enum Variable.Type extends Enum<Variable.Type> implements Variable
Type details of each variable in policies
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.client.solrj.cloud.autoscaling.Variable
Variable.Meta, Variable.Type
-
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from interface org.apache.solr.client.solrj.cloud.autoscaling.Variable
coreidxsize, NULL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 runtimeObject
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 clustervoid
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.
-
-
-
Enum Constant Detail
-
WITH_COLLECTION
public static final Variable.Type WITH_COLLECTION
-
COLL
public static final Variable.Type COLL
-
SHARD
public static final Variable.Type SHARD
-
REPLICA
public static final Variable.Type REPLICA
-
PORT
public static final Variable.Type PORT
-
IP_1
public static final Variable.Type IP_1
-
IP_2
public static final Variable.Type IP_2
-
IP_3
public static final Variable.Type IP_3
-
IP_4
public static final Variable.Type IP_4
-
FREEDISK
public static final Variable.Type FREEDISK
-
TOTALDISK
public static final Variable.Type TOTALDISK
-
CORE_IDX
public static final Variable.Type CORE_IDX
-
NODE_ROLE
public static final Variable.Type NODE_ROLE
-
CORES
public static final Variable.Type CORES
-
SYSLOADAVG
public static final Variable.Type SYSLOADAVG
-
HEAPUSAGE
public static final Variable.Type HEAPUSAGE
-
NUMBER
public static final Variable.Type NUMBER
-
HOST
public static final Variable.Type HOST
-
SYSPROP
public static final Variable.Type SYSPROP
-
NODE
public static final Variable.Type NODE
-
LAZY
public static final Variable.Type LAZY
-
DISKTYPE
public static final Variable.Type DISKTYPE
-
-
Field Detail
-
tagName
public final String tagName
-
type
public final Class type
-
meta
public Variable.Meta meta
-
min
public final Number min
-
max
public final Number max
-
additive
public final Boolean additive
-
perReplicaValue
public final String perReplicaValue
-
metricsAttribute
public final String metricsAttribute
-
supportedComputedTypes
public final Set<ComputedType> supportedComputedTypes
-
-
Method Detail
-
values
public static Variable.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Variable.Type c : Variable.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Variable.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getTagName
public String getTagName()
-
getSuggestions
public void getSuggestions(org.apache.solr.client.solrj.cloud.autoscaling.Suggestion.Ctx ctx)
- Specified by:
getSuggestions
in interfaceVariable
-
addViolatingReplicas
public boolean addViolatingReplicas(org.apache.solr.client.solrj.cloud.autoscaling.Violation.Ctx ctx)
- Specified by:
addViolatingReplicas
in interfaceVariable
-
getOperand
public Operand getOperand(Operand expected, Object val, ComputedType computedType)
- Specified by:
getOperand
in interfaceVariable
-
convertVal
public Object convertVal(Object val)
- Specified by:
convertVal
in interfaceVariable
-
postValidate
public String postValidate(Condition condition)
- Specified by:
postValidate
in interfaceVariable
-
projectAddReplica
public 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- Specified by:
projectAddReplica
in interfaceVariable
-
projectRemoveReplica
public void projectRemoveReplica(Cell cell, ReplicaInfo ri, Consumer<org.apache.solr.client.solrj.cloud.autoscaling.Row.OperationInfo> opCollector)
- Specified by:
projectRemoveReplica
in interfaceVariable
-
compareViolation
public int compareViolation(Violation v1, Violation v2)
- Specified by:
compareViolation
in interfaceVariable
-
computeValue
public Object computeValue(Policy.Session session, Condition condition, String collection, String shard, String node)
Description copied from interface:Variable
When a non constant value is used in a variable, the actual value needs to be computed at the runtime- Specified by:
computeValue
in interfaceVariable
-
computeDeviation
public void computeDeviation(Policy.Session session, double[] deviations, org.apache.solr.client.solrj.cloud.autoscaling.ReplicaCount replicaCount, SealedClause sealedClause)
- Specified by:
computeDeviation
in interfaceVariable
-
-