@InterfaceAudience.Private public class MetricsMasterQuotaSourceImpl extends BaseSourceImpl implements MetricsMasterQuotaSource
MetricsMasterQuotaSource
which writes the values passed in via the
interface to the metrics backend.Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.metrics2.lib.MutableGaugeLong |
namespacesViolatingQuotasGauge |
private MetricHistogram |
quotaObserverTimeHisto |
private org.apache.hadoop.metrics2.lib.MutableGaugeLong |
regionSpaceReportsGauge |
private MetricHistogram |
snapshotObserverSizeComputationTimeHisto |
private MetricHistogram |
snapshotObserverSnapshotFetchTimeHisto |
private MetricHistogram |
snapshotObserverTimeHisto |
private org.apache.hadoop.metrics2.lib.MutableGaugeLong |
spaceQuotasGauge |
private org.apache.hadoop.metrics2.lib.MutableGaugeLong |
tablesViolatingQuotasGauge |
private MetricsMasterWrapper |
wrapper |
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registry
METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, NS_QUOTA_USAGE_DESC, NS_QUOTA_USAGE_NAME, NUM_NS_QUOTA_VIOLATIONS_DESC, NUM_NS_QUOTA_VIOLATIONS_NAME, NUM_REGION_SIZE_REPORTS_DESC, NUM_REGION_SIZE_REPORTS_NAME, NUM_SPACE_QUOTAS_DESC, NUM_SPACE_QUOTAS_NAME, NUM_TABLES_QUOTA_VIOLATIONS_DESC, NUM_TABLES_QUOTA_VIOLATIONS_NAME, QUOTA_OBSERVER_CHORE_TIME_DESC, QUOTA_OBSERVER_CHORE_TIME_NAME, SNAPSHOT_OBSERVER_CHORE_TIME_DESC, SNAPSHOT_OBSERVER_CHORE_TIME_NAME, SNAPSHOT_OBSERVER_FETCH_TIME_DESC, SNAPSHOT_OBSERVER_FETCH_TIME_NAME, SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_DESC, SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_NAME, TABLE_QUOTA_USAGE_DESC, TABLE_QUOTA_USAGE_NAME
HBASE_METRICS_SYSTEM_NAME
Constructor and Description |
---|
MetricsMasterQuotaSourceImpl(MetricsMasterWrapper wrapper) |
MetricsMasterQuotaSourceImpl(String metricsName,
String metricsDescription,
String metricsContext,
String metricsJmxContext,
MetricsMasterWrapper wrapper) |
Modifier and Type | Method and Description |
---|---|
private String |
generateJsonQuotaSummary(Iterable<Map.Entry<String,Map.Entry<Long,Long>>> data,
String target)
Summarizes the usage and limit for many targets (table or namespace) into JSON.
|
void |
getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector,
boolean all) |
void |
incrementSnapshotObserverChoreTime(long time)
Updates the metric tracking the amount of time taken by the
SnapshotQuotaObserverChore
which runs periodically. |
void |
incrementSnapshotObserverSnapshotComputationTime(long time)
Updates the metric tracking the amount of time taken by the
SnapshotQuotaObserverChore
to compute the size of one snapshot, relative to the files referenced by the originating table. |
void |
incrementSnapshotObserverSnapshotFetchTime(long time)
Updates the metric tracking the amount of time taken by the
SnapshotQuotaObserverChore
to fetch all snapshots. |
void |
incrementSpaceQuotaObserverChoreTime(long time)
Updates the metric tracking the amount of time taken by the
QuotaObserverChore
which runs periodically. |
void |
updateNumCurrentSpaceQuotaRegionSizeReports(long numCurrentRegionSizeReports)
Updates the metric tracking the number of region size reports the master is currently
retaining in memory.
|
void |
updateNumNamespacesInSpaceQuotaViolation(long numNamespacesInViolation)
Updates the metric tracking the number of namespaces the master has computed to be in
violation of their space quota.
|
void |
updateNumSpaceQuotas(long numSpaceQuotas)
Updates the metric tracking the number of space quotas defined in the system.
|
void |
updateNumTablesInSpaceQuotaViolation(long numTablesInViolation)
Updates the metric tracking the number of tables the master has computed to be in
violation of their space quota.
|
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
private final MetricsMasterWrapper wrapper
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong spaceQuotasGauge
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong tablesViolatingQuotasGauge
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong namespacesViolatingQuotasGauge
private final org.apache.hadoop.metrics2.lib.MutableGaugeLong regionSpaceReportsGauge
private final MetricHistogram quotaObserverTimeHisto
private final MetricHistogram snapshotObserverTimeHisto
private final MetricHistogram snapshotObserverSizeComputationTimeHisto
private final MetricHistogram snapshotObserverSnapshotFetchTimeHisto
public MetricsMasterQuotaSourceImpl(MetricsMasterWrapper wrapper)
public MetricsMasterQuotaSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper wrapper)
public void updateNumSpaceQuotas(long numSpaceQuotas)
MetricsMasterQuotaSource
updateNumSpaceQuotas
in interface MetricsMasterQuotaSource
numSpaceQuotas
- The number of space quotas definedpublic void updateNumTablesInSpaceQuotaViolation(long numTablesInViolation)
MetricsMasterQuotaSource
updateNumTablesInSpaceQuotaViolation
in interface MetricsMasterQuotaSource
numTablesInViolation
- The number of tables violating a space quotapublic void updateNumNamespacesInSpaceQuotaViolation(long numNamespacesInViolation)
MetricsMasterQuotaSource
updateNumNamespacesInSpaceQuotaViolation
in interface MetricsMasterQuotaSource
numNamespacesInViolation
- The number of namespaces violating a space quotapublic void updateNumCurrentSpaceQuotaRegionSizeReports(long numCurrentRegionSizeReports)
MetricsMasterQuotaSource
updateNumCurrentSpaceQuotaRegionSizeReports
in interface MetricsMasterQuotaSource
numCurrentRegionSizeReports
- The number of region size reports the master is holding in
memorypublic void incrementSpaceQuotaObserverChoreTime(long time)
MetricsMasterQuotaSource
QuotaObserverChore
which runs periodically.incrementSpaceQuotaObserverChoreTime
in interface MetricsMasterQuotaSource
time
- The execution time of the chore in millisecondspublic void incrementSnapshotObserverChoreTime(long time)
MetricsMasterQuotaSource
SnapshotQuotaObserverChore
which runs periodically.incrementSnapshotObserverChoreTime
in interface MetricsMasterQuotaSource
public void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
getMetrics
in interface org.apache.hadoop.metrics2.MetricsSource
getMetrics
in class BaseSourceImpl
private String generateJsonQuotaSummary(Iterable<Map.Entry<String,Map.Entry<Long,Long>>> data, String target)
public void incrementSnapshotObserverSnapshotComputationTime(long time)
MetricsMasterQuotaSource
SnapshotQuotaObserverChore
to compute the size of one snapshot, relative to the files referenced by the originating table.incrementSnapshotObserverSnapshotComputationTime
in interface MetricsMasterQuotaSource
public void incrementSnapshotObserverSnapshotFetchTime(long time)
MetricsMasterQuotaSource
SnapshotQuotaObserverChore
to fetch all snapshots.incrementSnapshotObserverSnapshotFetchTime
in interface MetricsMasterQuotaSource
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.