@InterfaceAudience.Private public class MetricsStochasticBalancerSourceImpl extends MetricsBalancerSourceImpl implements MetricsStochasticBalancerSource
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
costFunctionDescs |
private int |
metricsSize |
private static float |
MRU_LOAD_FACTOR |
private int |
mruCap |
private Map<String,Map<String,Double>> |
stochasticCosts |
private static String |
TABLE_FUNCTION_SEP |
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registry
BALANCE_CLUSTER, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, MISC_INVOATION_COUNT
HBASE_METRICS_SYSTEM_NAME
Constructor and Description |
---|
MetricsStochasticBalancerSourceImpl() |
Modifier and Type | Method and Description |
---|---|
private static int |
calcMruCap(int metricsSize)
Calculates the mru cache capacity from the metrics size
|
void |
getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector,
boolean all) |
void |
updateMetricsSize(int size)
Updates the number of metrics reported to JMX
|
void |
updateStochasticCost(String tableName,
String costFunctionName,
String functionDesc,
Double cost)
Reports stochastic load balancer costs to JMX
|
incrMiscInvocations, init, updateBalanceCluster
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, removeMetric, setGauge, updateHistogram
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
incrMiscInvocations, updateBalanceCluster
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
private static final String TABLE_FUNCTION_SEP
private static final float MRU_LOAD_FACTOR
private int metricsSize
private int mruCap
private Map<String,String> costFunctionDescs
public MetricsStochasticBalancerSourceImpl()
private static int calcMruCap(int metricsSize)
public void updateMetricsSize(int size)
MetricsStochasticBalancerSource
updateMetricsSize
in interface MetricsStochasticBalancerSource
public void updateStochasticCost(String tableName, String costFunctionName, String functionDesc, Double cost)
updateStochasticCost
in interface MetricsStochasticBalancerSource
public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
getMetrics
in interface org.apache.hadoop.metrics2.MetricsSource
getMetrics
in class BaseSourceImpl
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.