HBASE-19605 Fixed Checkstyle errors in hbase-metrics-api and enabled Checkstyle to fail on violations
This commit is contained in:
parent
2f25589422
commit
ab6571ee7a
|
@ -68,6 +68,22 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>checkstyle</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<failOnViolation>true</failOnViolation>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
|
@ -17,28 +17,29 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.apache.hadoop.hbase.metrics;
|
package org.apache.hadoop.hbase.metrics;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ServiceLoader;
|
import java.util.ServiceLoader;
|
||||||
|
|
||||||
|
import org.apache.hadoop.hbase.util.ReflectionUtils;
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.hadoop.hbase.util.ReflectionUtils;
|
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
|
import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class MetricRegistriesLoader {
|
public final class MetricRegistriesLoader {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(MetricRegistries.class);
|
private static final Logger LOG = LoggerFactory.getLogger(MetricRegistries.class);
|
||||||
|
|
||||||
private static final String defaultClass
|
private static final String defaultClass
|
||||||
= "org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl";
|
= "org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl";
|
||||||
|
|
||||||
|
private MetricRegistriesLoader() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries}
|
* Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries}
|
||||||
* available to {@link ServiceLoader} on the classpath. If no instance is found, then default
|
* available to {@link ServiceLoader} on the classpath. If no instance is found, then default
|
||||||
|
|
|
@ -32,10 +32,10 @@ import org.apache.yetus.audience.InterfaceStability;
|
||||||
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
|
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
|
||||||
@InterfaceStability.Evolving
|
@InterfaceStability.Evolving
|
||||||
public interface MetricSet extends Metric {
|
public interface MetricSet extends Metric {
|
||||||
/**
|
/**
|
||||||
* A map of metric names to metrics.
|
* A map of metric names to metrics.
|
||||||
*
|
*
|
||||||
* @return the metrics
|
* @return the metrics
|
||||||
*/
|
*/
|
||||||
Map<String, Metric> getMetrics();
|
Map<String, Metric> getMetrics();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue