From 2a6dade00e780ff297d5db9d0d8a5ae95e148ae3 Mon Sep 17 00:00:00 2001 From: Himanshu Gwalani Date: Fri, 21 Aug 2026 14:48:59 +0530 Subject: [PATCH] PHOENIX-7991 Tag per-HA-group replication metric sources with the ha_group tag Register the ha_group Metrics2 tag on the six per-HA-group replication log metric sources (log group, processor, discovery replay/forwarder, tracker replay/forwarder) so their series can be sliced per HA group downstream, matching the existing HAGroupStore metrics source. Move the shared HA_GROUP_TAG_NAME / HA_GROUP_TAG_DESC constants out of the HAGroupStoreMetricsSource interface into a new module-neutral org.apache.phoenix.metrics.MetricConstants (phoenix-core-client) so both the client HAGroupStore source and the server-side replication sources reference a single definition. --- .../metrics/HAGroupStoreMetricsSource.java | 5 +- .../HAGroupStoreMetricsSourceImpl.java | 11 +- .../phoenix/metrics/MetricConstants.java | 38 ++++++ ...sReplicationLogDiscoveryForwarderImpl.java | 6 + ...ricsReplicationLogDiscoveryReplayImpl.java | 5 + .../MetricsReplicationLogGroupSourceImpl.java | 5 + .../MetricsReplicationLogProcessorImpl.java | 5 + ...icsReplicationLogTrackerForwarderImpl.java | 6 + ...etricsReplicationLogTrackerReplayImpl.java | 6 + .../HAGroupStoreMetricsSourceImplTest.java | 2 +- ...icsReplicationLogSourceHaGroupTagTest.java | 108 ++++++++++++++++++ 11 files changed, 188 insertions(+), 9 deletions(-) create mode 100644 phoenix-core-client/src/main/java/org/apache/phoenix/metrics/MetricConstants.java create mode 100644 phoenix-core/src/test/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogSourceHaGroupTagTest.java diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSource.java b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSource.java index 0af587c5037..5f015f32968 100644 --- a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSource.java +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSource.java @@ -30,7 +30,7 @@ * latest Metrics2 collection interval. Metrics are not transactionally coordinated across client * replacement or RegionServers and never feed HA decisions. *

- * {@code haGroup} is the only source-specific tag. Monitoring systems must supply cluster, + * {@code ha_group} is the only source-specific tag. Monitoring systems must supply cluster, * environment, host, and RegionServer identity as external scrape-target labels; role is mutable * and is represented by the state gauges rather than a tag. *

@@ -61,9 +61,6 @@ public interface HAGroupStoreMetricsSource extends BaseSource { // CLI invocations can create an incidental bean under the same context. String METRICS_JMX_CONTEXT = "RegionServer,sub=" + METRICS_NAME; - String HA_GROUP_TAG_NAME = "haGroup"; - String HA_GROUP_TAG_DESC = "HA group name"; - String LOCAL_CACHE_HEALTH_STATUS = "haGroupStoreLocalCacheHealthStatus"; String LOCAL_CACHE_HEALTH_STATUS_DESC = "Local HAGroupStore cache health status: 0 healthy, non-zero unhealthy"; diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImpl.java b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImpl.java index f7d731fe763..5ae452cbff0 100644 --- a/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImpl.java +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImpl.java @@ -17,6 +17,9 @@ */ package org.apache.phoenix.jdbc.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + import java.util.concurrent.TimeUnit; import javax.management.ObjectName; import org.apache.hadoop.hbase.metrics.BaseSourceImpl; @@ -58,10 +61,10 @@ public HAGroupStoreMetricsSourceImpl(String haGroupName) { metricsJmxContext + ",haGroup=" + ObjectName.quote(haGroupName)); getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); - localCacheHealthStatus = getMetricsRegistry().newGauge(LOCAL_CACHE_HEALTH_STATUS, - LOCAL_CACHE_HEALTH_STATUS_DESC, 1L); - peerVisibilityStatus = getMetricsRegistry().newGauge(PEER_VISIBILITY_STATUS, - PEER_VISIBILITY_STATUS_DESC, 1L); + localCacheHealthStatus = + getMetricsRegistry().newGauge(LOCAL_CACHE_HEALTH_STATUS, LOCAL_CACHE_HEALTH_STATUS_DESC, 1L); + peerVisibilityStatus = + getMetricsRegistry().newGauge(PEER_VISIBILITY_STATUS, PEER_VISIBILITY_STATUS_DESC, 1L); degradedStandbyActive = getMetricsRegistry().newGauge(DEGRADED_STANDBY_ACTIVE, DEGRADED_STANDBY_ACTIVE_DESC, 0L); currentLocalState = getMetricsRegistry().newGauge(CURRENT_LOCAL_STATE, CURRENT_LOCAL_STATE_DESC, diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/metrics/MetricConstants.java b/phoenix-core-client/src/main/java/org/apache/phoenix/metrics/MetricConstants.java new file mode 100644 index 00000000000..f92c19c2ba5 --- /dev/null +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/metrics/MetricConstants.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.metrics; + +/** + * Shared Hadoop Metrics2 constant definitions used across Phoenix metric sources. + *

+ * Holds the {@code ha_group} tag registered by the per-HA-group sources (HAGroupStore and the + * replication log sources) so their series can be sliced per HA group downstream. Lives in this + * module-neutral package so both {@code phoenix-core-client} and {@code phoenix-core-server} + * sources can reference it. + */ +public final class MetricConstants { + + /** Metrics2 tag name carrying the HA group name. */ + public static final String HA_GROUP_TAG_NAME = "ha_group"; + + /** Description for the {@link #HA_GROUP_TAG_NAME} tag. */ + public static final String HA_GROUP_TAG_DESC = "HA group name"; + + private MetricConstants() { + } +} diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryForwarderImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryForwarderImpl.java index 6216318dbf2..299d85fa453 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryForwarderImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryForwarderImpl.java @@ -17,6 +17,11 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + +import org.apache.hadoop.metrics2.lib.Interns; + /** Implementation of metrics source for ReplicationLogDiscoveryForwarder operations. */ public class MetricsReplicationLogDiscoveryForwarderImpl extends MetricsReplicationLogDiscoveryImpl { @@ -33,5 +38,6 @@ public MetricsReplicationLogDiscoveryForwarderImpl(final String haGroupName) { MetricsReplicationLogDiscoveryForwarderImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName); super.groupMetricsContext = MetricsReplicationLogDiscoveryForwarderImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName; + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); } } diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryReplayImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryReplayImpl.java index 16e65287d98..dc51fdae260 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryReplayImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogDiscoveryReplayImpl.java @@ -17,6 +17,10 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + +import org.apache.hadoop.metrics2.lib.Interns; import org.apache.hadoop.metrics2.lib.MutableGaugeLong; /** Implementation of metrics source for ReplicationLogDiscoveryReplay operations. */ @@ -35,6 +39,7 @@ public MetricsReplicationLogDiscoveryReplayImpl(final String haGroupName) { MetricsReplicationLogDiscoveryReplayImpl.METRICS_DESCRIPTION, MetricsReplicationLogDiscoveryImpl.METRICS_CONTEXT, MetricsReplicationLogDiscoveryReplayImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName); + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); consistencyPoint = getMetricsRegistry().newGauge(CONSISTENCY_POINT, CONSISTENCY_POINT_DESC, 0L); } diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogGroupSourceImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogGroupSourceImpl.java index 4b0ab4fd84c..845cb19184d 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogGroupSourceImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogGroupSourceImpl.java @@ -17,12 +17,16 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + import java.lang.reflect.Field; import java.util.concurrent.TimeUnit; import org.apache.hadoop.hbase.metrics.BaseSourceImpl; import org.apache.hadoop.hbase.metrics.Snapshot; import org.apache.hadoop.hbase.metrics.impl.HistogramImpl; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; +import org.apache.hadoop.metrics2.lib.Interns; import org.apache.hadoop.metrics2.lib.MutableFastCounter; import org.apache.hadoop.metrics2.lib.MutableHistogram; import org.apache.hadoop.metrics2.lib.MutableSizeHistogram; @@ -52,6 +56,7 @@ public MetricsReplicationLogGroupSourceImpl(String metricsName, String metricsDe String metricsContext, String metricsJmxContext, String haGroupName) { super(metricsName, metricsDescription, metricsContext, metricsJmxContext + ",haGroup=" + haGroupName); + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); rotationCount = getMetricsRegistry().newCounter(ROTATION_COUNT, ROTATION_COUNT_DESC, 0L); rotationFailuresCount = getMetricsRegistry().newCounter(ROTATION_FAILURES, ROTATION_FAILURES_DESC, 0L); diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogProcessorImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogProcessorImpl.java index be8f7715c96..1d487efc4be 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogProcessorImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogProcessorImpl.java @@ -17,8 +17,12 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + import org.apache.hadoop.hbase.metrics.BaseSourceImpl; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; +import org.apache.hadoop.metrics2.lib.Interns; import org.apache.hadoop.metrics2.lib.MutableFastCounter; import org.apache.hadoop.metrics2.lib.MutableHistogram; @@ -38,6 +42,7 @@ public MetricsReplicationLogProcessorImpl(final String haGroupName) { this(METRICS_NAME, METRICS_DESCRIPTION, METRICS_CONTEXT, METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName); groupMetricsContext = METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName; + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); } public MetricsReplicationLogProcessorImpl(String metricsName, String metricsDescription, diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerForwarderImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerForwarderImpl.java index f94a130b09e..1901cc3c12b 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerForwarderImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerForwarderImpl.java @@ -17,6 +17,11 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + +import org.apache.hadoop.metrics2.lib.Interns; + public class MetricsReplicationLogTrackerForwarderImpl extends MetricsReplicationLogTrackerImpl { private static final String METRICS_NAME = "ReplicationLogTrackerForwarder"; @@ -31,6 +36,7 @@ public MetricsReplicationLogTrackerForwarderImpl(final String haGroupName) { MetricsReplicationLogTrackerForwarderImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName); super.groupMetricsContext = MetricsReplicationLogTrackerForwarderImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName; + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); } } diff --git a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerReplayImpl.java b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerReplayImpl.java index 1fad372c5c6..1accdabf47b 100644 --- a/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerReplayImpl.java +++ b/phoenix-core-server/src/main/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogTrackerReplayImpl.java @@ -17,6 +17,11 @@ */ package org.apache.phoenix.replication.metrics; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_DESC; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; + +import org.apache.hadoop.metrics2.lib.Interns; + public class MetricsReplicationLogTrackerReplayImpl extends MetricsReplicationLogTrackerImpl { private static final String METRICS_NAME = "ReplicationLogReplayFileTracker"; @@ -31,6 +36,7 @@ public MetricsReplicationLogTrackerReplayImpl(final String haGroupName) { MetricsReplicationLogTrackerReplayImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName); super.groupMetricsContext = MetricsReplicationLogTrackerReplayImpl.METRICS_JMX_CONTEXT + ",haGroup=" + haGroupName; + getMetricsRegistry().tag(Interns.info(HA_GROUP_TAG_NAME, HA_GROUP_TAG_DESC), haGroupName); } } diff --git a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImplTest.java b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImplTest.java index 9eabdd97b9c..3473aad482d 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImplTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/metrics/HAGroupStoreMetricsSourceImplTest.java @@ -21,7 +21,6 @@ import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.CURRENT_PEER_STATE; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.DEGRADED_STANDBY_ACTIVE; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.DEGRADED_STANDBY_PRESENTED_COUNT; -import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.HA_GROUP_TAG_NAME; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.INVALID_TRANSITION_REJECTED_COUNT; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.LOCAL_CACHE_HEALTH_STATUS; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.LOCAL_ZK_CONNECTION_LOST_COUNT; @@ -31,6 +30,7 @@ import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.SUBSCRIBER_NOTIFY_TIME_MS; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.SUBSCRIBER_NOTIFY_TIME_MS_EXPORTED_BASE; import static org.apache.phoenix.jdbc.metrics.HAGroupStoreMetricsSource.SYSTEM_TABLE_SYNC_FAILED_COUNT; +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; diff --git a/phoenix-core/src/test/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogSourceHaGroupTagTest.java b/phoenix-core/src/test/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogSourceHaGroupTagTest.java new file mode 100644 index 00000000000..a59055f284b --- /dev/null +++ b/phoenix-core/src/test/java/org/apache/phoenix/replication/metrics/MetricsReplicationLogSourceHaGroupTagTest.java @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.replication.metrics; + +import static org.apache.phoenix.metrics.MetricConstants.HA_GROUP_TAG_NAME; +import static org.junit.Assert.assertEquals; + +import org.apache.hadoop.hbase.metrics.BaseSourceImpl; +import org.junit.Test; + +/** + * Verifies that every per-HA-group replication metrics source registers the {@code haGroup} + * Metrics2 tag carrying the raw (unquoted, case-preserved) HA group name, matching the existing + * HAGroupStore metrics source. This is the tag the JMX-to-Argus collector promotes so replication + * metrics can be sliced per HA group. + */ +public class MetricsReplicationLogSourceHaGroupTagTest { + + private static void assertHaGroupTagged(BaseSourceImpl source, String haGroupName) { + assertEquals(haGroupName, source.getMetricsRegistry().getTag(HA_GROUP_TAG_NAME).value()); + } + + @Test + public void testLogGroupSourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogGroupSourceImpl source = + new MetricsReplicationLogGroupSourceImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } + + @Test + public void testLogProcessorSourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogProcessorImpl source = new MetricsReplicationLogProcessorImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } + + @Test + public void testDiscoveryReplaySourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogDiscoveryReplayImpl source = + new MetricsReplicationLogDiscoveryReplayImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } + + @Test + public void testDiscoveryForwarderSourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogDiscoveryForwarderImpl source = + new MetricsReplicationLogDiscoveryForwarderImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } + + @Test + public void testTrackerReplaySourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogTrackerReplayImpl source = + new MetricsReplicationLogTrackerReplayImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } + + @Test + public void testTrackerForwarderSourceTagsHaGroup() { + String haGroupName = "testHaGroup-" + System.nanoTime(); + MetricsReplicationLogTrackerForwarderImpl source = + new MetricsReplicationLogTrackerForwarderImpl(haGroupName); + try { + assertHaGroupTagged(source, haGroupName); + } finally { + source.close(); + } + } +}