HBASE-26702 Make ageOfLastShip, ageOfLastApplied extend TimeHistogram instead of plain histogram. (#4098)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Rushabh Shah 2022-02-08 21:08:34 -05:00 committed by Duo Zhang
parent d091751ab0
commit 409b175216
4 changed files with 5 additions and 4 deletions

View File

@ -61,7 +61,8 @@ public class MetricsReplicationGlobalSourceSourceImpl
public MetricsReplicationGlobalSourceSourceImpl(MetricsReplicationSourceImpl rms) { public MetricsReplicationGlobalSourceSourceImpl(MetricsReplicationSourceImpl rms) {
this.rms = rms; this.rms = rms;
ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(SOURCE_AGE_OF_LAST_SHIPPED_OP); ageOfLastShippedOpHist =
rms.getMetricsRegistry().newTimeHistogram(SOURCE_AGE_OF_LAST_SHIPPED_OP);
sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L); sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L);

View File

@ -31,7 +31,7 @@ public class MetricsReplicationSinkSourceImpl implements MetricsReplicationSinkS
private final MutableFastCounter hfilesCounter; private final MutableFastCounter hfilesCounter;
public MetricsReplicationSinkSourceImpl(MetricsReplicationSourceImpl rms) { public MetricsReplicationSinkSourceImpl(MetricsReplicationSourceImpl rms) {
ageHist = rms.getMetricsRegistry().getHistogram(SINK_AGE_OF_LAST_APPLIED_OP); ageHist = rms.getMetricsRegistry().newTimeHistogram(SINK_AGE_OF_LAST_APPLIED_OP);
batchesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_BATCHES, 0L); batchesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_BATCHES, 0L);
opsCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_OPS, 0L); opsCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_OPS, 0L);
hfilesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_HFILES, 0L); hfilesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_HFILES, 0L);

View File

@ -83,7 +83,7 @@ public class MetricsReplicationSourceSourceImpl implements MetricsReplicationSou
this.keyPrefix = "source." + this.id + "."; this.keyPrefix = "source." + this.id + ".";
ageOfLastShippedOpKey = this.keyPrefix + "ageOfLastShippedOp"; ageOfLastShippedOpKey = this.keyPrefix + "ageOfLastShippedOp";
ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(ageOfLastShippedOpKey); ageOfLastShippedOpHist = rms.getMetricsRegistry().newTimeHistogram(ageOfLastShippedOpKey);
sizeOfLogQueueKey = this.keyPrefix + "sizeOfLogQueue"; sizeOfLogQueueKey = this.keyPrefix + "sizeOfLogQueue";
sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(sizeOfLogQueueKey, 0L); sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(sizeOfLogQueueKey, 0L);

View File

@ -45,7 +45,7 @@ public class MetricsReplicationTableSourceImpl implements MetricsReplicationTabl
this.keyPrefix = "source." + this.tableName + "."; this.keyPrefix = "source." + this.tableName + ".";
ageOfLastShippedOpKey = this.keyPrefix + "ageOfLastShippedOp"; ageOfLastShippedOpKey = this.keyPrefix + "ageOfLastShippedOp";
ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(ageOfLastShippedOpKey); ageOfLastShippedOpHist = rms.getMetricsRegistry().newTimeHistogram(ageOfLastShippedOpKey);
shippedBytesKey = this.keyPrefix + "shippedBytes"; shippedBytesKey = this.keyPrefix + "shippedBytes";
shippedBytesCounter = rms.getMetricsRegistry().getCounter(shippedBytesKey, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(shippedBytesKey, 0L);