@InterfaceAudience.Private public class MetricsTableSourceImpl extends Object implements MetricsTableSource
TABLE_SIZE, TABLE_SIZE_DESC
Constructor and Description |
---|
MetricsTableSourceImpl(String tblName,
MetricsTableAggregateSourceImpl aggregate,
MetricsTableWrapperAggregate tblWrapperAgg) |
Modifier and Type | Method and Description |
---|---|
private void |
addGauge(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb,
Map<String,Long> metricMap,
String metricName,
String metricDesc) |
void |
close()
Close the table's metrics as all the region are closing.
|
int |
compareTo(MetricsTableSource source) |
private void |
deregisterMetrics() |
boolean |
equals(Object o) |
MetricsTableAggregateSource |
getAggregateSource()
Get the aggregate source to which this reports.
|
String |
getTableName() |
String |
getTableNamePrefix() |
MetricsTableWrapperAggregate |
getTableWrapper() |
int |
hashCode() |
void |
incrSplitRequest()
Increment number of a requested splits
|
void |
incrSplitSuccess()
Increment number of successful splits
|
void |
registerMetrics() |
(package private) void |
snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb,
boolean ignored) |
void |
updateCompactionInputFileCount(boolean isMajor,
long c)
Update the compaction input number of files histogram
|
void |
updateCompactionInputSize(boolean isMajor,
long bytes)
Update the compaction total input file size histogram
|
void |
updateCompactionOutputFileCount(boolean isMajor,
long c)
Update the compaction output number of files histogram
|
void |
updateCompactionOutputSize(boolean isMajor,
long bytes)
Update the compaction total output file size
|
void |
updateCompactionTime(boolean isMajor,
long t)
Update the compaction time histogram, both major and minor
|
void |
updateFlushMemstoreSize(long bytes)
Update the flush memstore size histogram
|
void |
updateFlushOutputSize(long bytes)
Update the flush output file size histogram
|
void |
updateFlushTime(long t)
Update the flush time histogram
|
void |
updateSplitTime(long t)
Update the split transaction time histogram
|
private static final String _COLUMNFAMILY
private static final org.slf4j.Logger LOG
private AtomicBoolean closed
private MetricsTableWrapperAggregate tableWrapperAgg
private final MetricsTableAggregateSourceImpl agg
private final DynamicMetricsRegistry registry
private final String tableNamePrefix
private final String tableNamePrefixPart1
private final String tableNamePrefixPart2
private final int hashCode
private MutableFastCounter splitRequest
private MutableFastCounter splitSuccess
private MetricHistogram splitTimeHisto
private MetricHistogram flushTimeHisto
private MetricHistogram flushMemstoreSizeHisto
private MetricHistogram flushOutputSizeHisto
private MutableFastCounter flushedMemstoreBytes
private MutableFastCounter flushedOutputBytes
private MetricHistogram compactionTimeHisto
private MetricHistogram compactionInputFileCountHisto
private MetricHistogram compactionInputSizeHisto
private MetricHistogram compactionOutputFileCountHisto
private MetricHistogram compactionOutputSizeHisto
private MutableFastCounter compactedInputBytes
private MutableFastCounter compactedOutputBytes
private MetricHistogram majorCompactionTimeHisto
private MetricHistogram majorCompactionInputFileCountHisto
private MetricHistogram majorCompactionInputSizeHisto
private MetricHistogram majorCompactionOutputFileCountHisto
private MetricHistogram majorCompactionOutputSizeHisto
private MutableFastCounter majorCompactedInputBytes
private MutableFastCounter majorCompactedOutputBytes
public MetricsTableSourceImpl(String tblName, MetricsTableAggregateSourceImpl aggregate, MetricsTableWrapperAggregate tblWrapperAgg)
public void registerMetrics()
registerMetrics
in interface MetricsTableSource
private void deregisterMetrics()
public void close()
MetricsTableSource
close
in interface Closeable
close
in interface AutoCloseable
close
in interface MetricsTableSource
public MetricsTableAggregateSource getAggregateSource()
MetricsTableSource
getAggregateSource
in interface MetricsTableSource
public int compareTo(MetricsTableSource source)
compareTo
in interface Comparable<MetricsTableSource>
void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb, boolean ignored)
private void addGauge(org.apache.hadoop.metrics2.MetricsRecordBuilder mrb, Map<String,Long> metricMap, String metricName, String metricDesc)
public String getTableName()
getTableName
in interface MetricsTableSource
public MetricsTableWrapperAggregate getTableWrapper()
public String getTableNamePrefix()
public void incrSplitRequest()
MetricsTableSource
incrSplitRequest
in interface MetricsTableSource
public void incrSplitSuccess()
MetricsTableSource
incrSplitSuccess
in interface MetricsTableSource
public void updateSplitTime(long t)
MetricsTableSource
updateSplitTime
in interface MetricsTableSource
t
- time it took, in millisecondspublic void updateFlushTime(long t)
MetricsTableSource
updateFlushTime
in interface MetricsTableSource
t
- time it took, in millisecondspublic void updateFlushMemstoreSize(long bytes)
MetricsTableSource
updateFlushMemstoreSize
in interface MetricsTableSource
bytes
- the number of bytes in the memstorepublic void updateFlushOutputSize(long bytes)
MetricsTableSource
updateFlushOutputSize
in interface MetricsTableSource
bytes
- the number of bytes in the output filepublic void updateCompactionTime(boolean isMajor, long t)
MetricsTableSource
updateCompactionTime
in interface MetricsTableSource
isMajor
- whether compaction is a major compactiont
- time it took, in millisecondspublic void updateCompactionInputFileCount(boolean isMajor, long c)
MetricsTableSource
updateCompactionInputFileCount
in interface MetricsTableSource
isMajor
- whether compaction is a major compactionc
- number of filespublic void updateCompactionInputSize(boolean isMajor, long bytes)
MetricsTableSource
updateCompactionInputSize
in interface MetricsTableSource
isMajor
- whether compaction is a major compactionbytes
- the number of bytes of the compaction input filepublic void updateCompactionOutputFileCount(boolean isMajor, long c)
MetricsTableSource
updateCompactionOutputFileCount
in interface MetricsTableSource
isMajor
- whether compaction is a major compactionc
- number of filespublic void updateCompactionOutputSize(boolean isMajor, long bytes)
MetricsTableSource
updateCompactionOutputSize
in interface MetricsTableSource
isMajor
- whether compaction is a major compactionbytes
- the number of bytes of the compaction input fileCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.