@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, registryMETRICS_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_NAMEHBASE_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, updateHistogramclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogramprivate 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)
MetricsMasterQuotaSourceupdateNumSpaceQuotas in interface MetricsMasterQuotaSourcenumSpaceQuotas - The number of space quotas definedpublic void updateNumTablesInSpaceQuotaViolation(long numTablesInViolation)
MetricsMasterQuotaSourceupdateNumTablesInSpaceQuotaViolation in interface MetricsMasterQuotaSourcenumTablesInViolation - The number of tables violating a space quotapublic void updateNumNamespacesInSpaceQuotaViolation(long numNamespacesInViolation)
MetricsMasterQuotaSourceupdateNumNamespacesInSpaceQuotaViolation in interface MetricsMasterQuotaSourcenumNamespacesInViolation - The number of namespaces violating a space quotapublic void updateNumCurrentSpaceQuotaRegionSizeReports(long numCurrentRegionSizeReports)
MetricsMasterQuotaSourceupdateNumCurrentSpaceQuotaRegionSizeReports in interface MetricsMasterQuotaSourcenumCurrentRegionSizeReports - The number of region size reports the master is holding in
memorypublic void incrementSpaceQuotaObserverChoreTime(long time)
MetricsMasterQuotaSourceQuotaObserverChore
which runs periodically.incrementSpaceQuotaObserverChoreTime in interface MetricsMasterQuotaSourcetime - The execution time of the chore in millisecondspublic void incrementSnapshotObserverChoreTime(long time)
MetricsMasterQuotaSourceSnapshotQuotaObserverChore
which runs periodically.incrementSnapshotObserverChoreTime in interface MetricsMasterQuotaSourcepublic void getMetrics(org.apache.hadoop.metrics2.MetricsCollector metricsCollector, boolean all)
getMetrics in interface org.apache.hadoop.metrics2.MetricsSourcegetMetrics in class BaseSourceImplprivate String generateJsonQuotaSummary(Iterable<Map.Entry<String,Map.Entry<Long,Long>>> data, String target)
public void incrementSnapshotObserverSnapshotComputationTime(long time)
MetricsMasterQuotaSourceSnapshotQuotaObserverChore
to compute the size of one snapshot, relative to the files referenced by the originating table.incrementSnapshotObserverSnapshotComputationTime in interface MetricsMasterQuotaSourcepublic void incrementSnapshotObserverSnapshotFetchTime(long time)
MetricsMasterQuotaSourceSnapshotQuotaObserverChore
to fetch all snapshots.incrementSnapshotObserverSnapshotFetchTime in interface MetricsMasterQuotaSourceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.