diff --git a/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/HistogramImpl.java b/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/HistogramImpl.java index 6871f7e7b8b..7b79fba50f1 100644 --- a/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/HistogramImpl.java +++ b/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/HistogramImpl.java @@ -65,6 +65,7 @@ public class HistogramImpl implements Histogram { histogram.add(value, 1); } + @Override public long getCount() { return counter.getCount(); } @@ -73,6 +74,7 @@ public class HistogramImpl implements Histogram { return this.histogram.getMax(); } + @Override public Snapshot snapshot() { return histogram.snapshotAndReset(); } diff --git a/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/MetricRegistriesImpl.java b/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/MetricRegistriesImpl.java index d72c68f61e6..3826e66093b 100644 --- a/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/MetricRegistriesImpl.java +++ b/hbase-metrics/src/main/java/org/apache/hadoop/hbase/metrics/impl/MetricRegistriesImpl.java @@ -51,22 +51,27 @@ public class MetricRegistriesImpl extends MetricRegistries { return registries.put(info, () -> factory.create(info)); } + @Override public boolean remove(MetricRegistryInfo key) { return registries.remove(key) == null; } + @Override public Optional get(MetricRegistryInfo info) { return Optional.ofNullable(registries.get(info)); } + @Override public Collection getMetricRegistries() { return Collections.unmodifiableCollection(registries.values()); } + @Override public void clear() { registries.clear(); } + @Override public Set getMetricRegistryInfos() { return Collections.unmodifiableSet(registries.keySet()); }