@InterfaceAudience.Private public class MetricsTableQueryMeterImpl extends Object implements MetricsTableQueryMeter
MetricsTableQueryMeter
to track query per second for each table in a
RegionServer.Modifier and Type | Class and Description |
---|---|
private static class |
MetricsTableQueryMeterImpl.TableMeters |
Modifier and Type | Field and Description |
---|---|
private Map<TableName,MetricsTableQueryMeterImpl.TableMeters> |
metersByTable |
private MetricRegistry |
metricRegistry |
TABLE_READ_QUERY_PER_SECOND, TABLE_WRITE_QUERY_PER_SECOND
Constructor and Description |
---|
MetricsTableQueryMeterImpl(MetricRegistry metricRegistry) |
Modifier and Type | Method and Description |
---|---|
private MetricsTableQueryMeterImpl.TableMeters |
getOrCreateTableMeter(TableName tableName) |
private static String |
qualifyMetricsName(TableName tableName,
String metric) |
void |
updateTableReadQueryMeter(TableName tableName)
Update table read QPS
|
void |
updateTableReadQueryMeter(TableName tableName,
long count)
Update table read QPS
|
void |
updateTableWriteQueryMeter(TableName tableName)
Update table write QPS
|
void |
updateTableWriteQueryMeter(TableName tableName,
long count)
Update table write QPS
|
private final Map<TableName,MetricsTableQueryMeterImpl.TableMeters> metersByTable
private final MetricRegistry metricRegistry
public MetricsTableQueryMeterImpl(MetricRegistry metricRegistry)
private static String qualifyMetricsName(TableName tableName, String metric)
private MetricsTableQueryMeterImpl.TableMeters getOrCreateTableMeter(TableName tableName)
public void updateTableReadQueryMeter(TableName tableName, long count)
MetricsTableQueryMeter
updateTableReadQueryMeter
in interface MetricsTableQueryMeter
tableName
- The table the metric is forcount
- Number of occurrences to recordpublic void updateTableReadQueryMeter(TableName tableName)
MetricsTableQueryMeter
updateTableReadQueryMeter
in interface MetricsTableQueryMeter
tableName
- The table the metric is forpublic void updateTableWriteQueryMeter(TableName tableName, long count)
MetricsTableQueryMeter
updateTableWriteQueryMeter
in interface MetricsTableQueryMeter
tableName
- The table the metric is forcount
- Number of occurrences to recordpublic void updateTableWriteQueryMeter(TableName tableName)
MetricsTableQueryMeter
updateTableWriteQueryMeter
in interface MetricsTableQueryMeter
tableName
- The table the metric is forCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.