diff --git a/CHANGES.txt b/CHANGES.txt index 7bfc697a979..1312b6f2ded 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -463,6 +463,7 @@ Release 0.21.0 - Unreleased HBASE-2890 Initialize RPC JMX metrics on startup (Gary Helmling via Stack) HBASE-2755 Duplicate assignment of a region after region server recovery (Kannan Muthukkaruppan via Stack) + HBASE-2892 Replication metrics aren't updated IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSinkMetrics.java b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSinkMetrics.java index 4c3b3256969..ae14375c602 100644 --- a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSinkMetrics.java +++ b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSinkMetrics.java @@ -58,8 +58,6 @@ public class ReplicationSinkMetrics implements Updater { metricsRecord = MetricsUtil.createRecord(context, "replication"); metricsRecord.setTag("RegionServer", name); context.registerUpdater(this); - // Add jvmmetrics. - JvmMetrics.init("RegionServer", name); // export for JMX new ReplicationStatistics(this.registry, "ReplicationSink"); } @@ -78,5 +76,6 @@ public class ReplicationSinkMetrics implements Updater { this.appliedBatchesRate.pushMetric(this.metricsRecord); this.ageOfLastAppliedOp.pushMetric(this.metricsRecord); } + this.metricsRecord.update(); } } diff --git a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java index dca63134bf9..6c07a2f3c18 100644 --- a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java +++ b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java @@ -73,8 +73,6 @@ public class ReplicationSourceMetrics implements Updater { metricsRecord = MetricsUtil.createRecord(context, "replication"); metricsRecord.setTag("RegionServer", name); context.registerUpdater(this); - // Add jvmmetrics. - JvmMetrics.init("RegionServer", name); // export for JMX new ReplicationStatistics(this.registry, "ReplicationSource for " + id); } @@ -97,5 +95,6 @@ public class ReplicationSourceMetrics implements Updater { this.ageOfLastShippedOp.pushMetric(this.metricsRecord); this.sizeOfLogQueue.pushMetric(this.metricsRecord); } + this.metricsRecord.update(); } }