@ThreadSafe public abstract class BaseDistributionGoalMetrics extends Object
goalName
:
MAX_RESOURCE_METRIC_NAME
-
the highest resource usage of any single broker within the cluster during the optimization run.
MIN_RESOURCE_METRIC_NAME
-
the lowest resource usage of any single broker within the cluster during the optimization run.
LOWER_BALANCE_THRESHOLD_METRIC_NAME
-
the resource distribution goal's lower balance threshold for this optimization run, in absolute terms (e.g GB, KB/s, etc. depending on the goal).
Any brokers under this threshold will have the goal attempt to move resources into them.
UPPER_BALANCE_THRESHOLD_METRIC_NAME
-
the resource distribution goal's upper balance threshold for this optimization run, in absolute terms (e.g GB, KB/s, etc. depending on the goal).
Any brokers over this threshold will have the goal attempt to move resources out of them.
Modifier and Type | Field and Description |
---|---|
static String |
GOAL_TAG |
protected String |
goalName |
protected double |
lowerBalanceThresholdValue |
protected static String |
MAX_RESOURCE_METRIC_NAME |
protected BrokerResourceMetric |
maxBrokerResource |
protected DataBalancerMetricsRegistry |
metricsRegistry |
protected static String |
MIN_RESOURCE_METRIC_NAME |
protected BrokerResourceMetric |
minBrokerResource |
protected SortedMap<String,String> |
tags |
protected double |
upperBalanceThresholdValue |
Constructor and Description |
---|
BaseDistributionGoalMetrics(String goalName,
DataBalancerMetricsRegistry metricsRegistry,
Class<?> metricClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
registerMetrics(Class<?> metricClass) |
protected void |
update(BrokerResourceStats maxBrokerResourceOverUpperLimitOpt,
BrokerResourceStats minBrokerResourceUnderLowerLimitOpt,
double balanceLowerValueThreshold,
double balanceUpperValueThreshold) |
protected static final String MIN_RESOURCE_METRIC_NAME
protected static final String MAX_RESOURCE_METRIC_NAME
public static final String GOAL_TAG
protected final String goalName
protected final BrokerResourceMetric maxBrokerResource
protected final BrokerResourceMetric minBrokerResource
protected volatile double lowerBalanceThresholdValue
protected volatile double upperBalanceThresholdValue
protected final DataBalancerMetricsRegistry metricsRegistry
public BaseDistributionGoalMetrics(String goalName, DataBalancerMetricsRegistry metricsRegistry, Class<?> metricClass)
protected void update(BrokerResourceStats maxBrokerResourceOverUpperLimitOpt, BrokerResourceStats minBrokerResourceUnderLowerLimitOpt, double balanceLowerValueThreshold, double balanceUpperValueThreshold)
protected void registerMetrics(Class<?> metricClass)