@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, registryBALANCE_CLUSTER, BALANCER_STATUS, METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, MISC_INVOATION_COUNTHBASE_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, updateBalancerStatusdecGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, removeMetric, setGauge, updateHistogramclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitincrMiscInvocations, updateBalanceCluster, updateBalancerStatusdecGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogramprivate 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)
MetricsStochasticBalancerSourceupdateMetricsSize in interface MetricsStochasticBalancerSourcepublic void updateStochasticCost(String tableName, String costFunctionName, String functionDesc, Double cost)
updateStochasticCost in interface MetricsStochasticBalancerSourcepublic void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
getMetrics in interface org.apache.hadoop.metrics2.MetricsSourcegetMetrics in class BaseSourceImplCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.