diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml index 5e138495ed9..f2a89af6b8b 100644 --- a/hbase-metrics-api/pom.xml +++ b/hbase-metrics-api/pom.xml @@ -68,6 +68,22 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + + + checkstyle + validate + + check + + + true + + + + diff --git a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java index d398c257074..f084d997361 100644 --- a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java +++ b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java @@ -17,28 +17,29 @@ * limitations under the License. */ - package org.apache.hadoop.hbase.metrics; - import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; +import org.apache.hadoop.hbase.util.ReflectionUtils; import org.apache.yetus.audience.InterfaceAudience; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.hadoop.hbase.util.ReflectionUtils; import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting; @InterfaceAudience.Private -public class MetricRegistriesLoader { +public final class MetricRegistriesLoader { private static final Logger LOG = LoggerFactory.getLogger(MetricRegistries.class); private static final String defaultClass = "org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl"; + private MetricRegistriesLoader() { + } + /** * Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries} * available to {@link ServiceLoader} on the classpath. If no instance is found, then default diff --git a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricSet.java b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricSet.java index 41ddcee2f57..5e1c873ce8b 100644 --- a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricSet.java +++ b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricSet.java @@ -32,10 +32,10 @@ import org.apache.yetus.audience.InterfaceStability; @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) @InterfaceStability.Evolving public interface MetricSet extends Metric { - /** - * A map of metric names to metrics. - * - * @return the metrics - */ - Map getMetrics(); + /** + * A map of metric names to metrics. + * + * @return the metrics + */ + Map getMetrics(); }