Class MetricsStochasticBalancerSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.master.balancer.MetricsBalancerSourceImpl
org.apache.hadoop.hbase.master.balancer.MetricsStochasticBalancerSourceImpl
- All Implemented Interfaces:
MetricsBalancerSource
,MetricsStochasticBalancerSource
,BaseSource
,org.apache.hadoop.metrics2.MetricsSource
@Private
public class MetricsStochasticBalancerSourceImpl
extends MetricsBalancerSourceImpl
implements MetricsStochasticBalancerSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private static final float
private int
private static final String
Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registry
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
Fields inherited from interface org.apache.hadoop.hbase.master.balancer.MetricsBalancerSource
BALANCE_CLUSTER, BALANCER_STATUS, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, MISC_INVOATION_COUNT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calcMruCap
(int metricsSize) Calculates the mru cache capacity from the metrics sizevoid
getMetrics
(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all) void
updateMetricsSize
(int size) Updates the number of metrics reported to JMXvoid
updateStochasticCost
(String tableName, String costFunctionName, String functionDesc, Double cost) Reports stochastic load balancer costs to JMXMethods inherited from class org.apache.hadoop.hbase.master.balancer.MetricsBalancerSourceImpl
incrMiscInvocations, init, updateBalanceCluster, updateBalancerStatus
Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, removeMetric, setGauge, updateHistogram
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
Methods inherited from interface org.apache.hadoop.hbase.master.balancer.MetricsBalancerSource
incrMiscInvocations, updateBalanceCluster, updateBalancerStatus
-
Field Details
-
TABLE_FUNCTION_SEP
- See Also:
-
MRU_LOAD_FACTOR
- See Also:
-
metricsSize
-
mruCap
-
stochasticCosts
-
costFunctionDescs
-
-
Constructor Details
-
MetricsStochasticBalancerSourceImpl
public MetricsStochasticBalancerSourceImpl()
-
-
Method Details
-
calcMruCap
Calculates the mru cache capacity from the metrics size -
updateMetricsSize
Description copied from interface:MetricsStochasticBalancerSource
Updates the number of metrics reported to JMX- Specified by:
updateMetricsSize
in interfaceMetricsStochasticBalancerSource
-
updateStochasticCost
public void updateStochasticCost(String tableName, String costFunctionName, String functionDesc, Double cost) Reports stochastic load balancer costs to JMX- Specified by:
updateStochasticCost
in interfaceMetricsStochasticBalancerSource
-
getMetrics
- Specified by:
getMetrics
in interfaceorg.apache.hadoop.metrics2.MetricsSource
- Overrides:
getMetrics
in classBaseSourceImpl
-