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
FieldsModifier and TypeFieldDescriptionprivate intprivate static final floatprivate intprivate static final StringFields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registryFields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAMEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalcMruCap(int metricsSize) Calculates the mru cache capacity from the metrics sizevoidgetMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all) voidupdateMetricsSize(int size) Updates the number of metrics reported to JMXvoidupdateStochasticCost(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, updateBalancerStatusMethods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, removeMetric, setGauge, updateHistogramMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogramMethods 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:MetricsStochasticBalancerSourceUpdates the number of metrics reported to JMX- Specified by:
updateMetricsSizein interfaceMetricsStochasticBalancerSource
-
updateStochasticCost
public void updateStochasticCost(String tableName, String costFunctionName, String functionDesc, Double cost) Reports stochastic load balancer costs to JMX- Specified by:
updateStochasticCostin interfaceMetricsStochasticBalancerSource
-
getMetrics
- Specified by:
getMetricsin interfaceorg.apache.hadoop.metrics2.MetricsSource- Overrides:
getMetricsin classBaseSourceImpl
-