hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject hbase git commit: HBASE-19605 Fixed Checkstyle errors in hbase-metrics-api and enabled Checkstyle to fail on violations
Date Sat, 23 Dec 2017 23:58:43 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 1e490dcc1 -> 93870dc08


HBASE-19605 Fixed Checkstyle errors in hbase-metrics-api and enabled Checkstyle to fail on
violations


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/93870dc0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/93870dc0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/93870dc0

Branch: refs/heads/branch-2
Commit: 93870dc08d87e21d84d7ae3c51f6f39abd92dbc9
Parents: 1e490dc
Author: Jan Hentschel <jan.hentschel@ultratendency.com>
Authored: Sat Dec 23 17:51:22 2017 +0100
Committer: Jan Hentschel <jan.hentschel@ultratendency.com>
Committed: Sun Dec 24 00:54:30 2017 +0100

----------------------------------------------------------------------
 hbase-metrics-api/pom.xml                           | 16 ++++++++++++++++
 .../hbase/metrics/MetricRegistriesLoader.java       |  9 +++++----
 .../org/apache/hadoop/hbase/metrics/MetricSet.java  | 12 ++++++------
 3 files changed, 27 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/93870dc0/hbase-metrics-api/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml
index 4d29833..d04cb1d 100644
--- a/hbase-metrics-api/pom.xml
+++ b/hbase-metrics-api/pom.xml
@@ -68,6 +68,22 @@
           </execution>
         </executions>
       </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>
   </build>
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/93870dc0/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java
----------------------------------------------------------------------
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 d398c25..f084d99 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

http://git-wip-us.apache.org/repos/asf/hbase/blob/93870dc0/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricSet.java
----------------------------------------------------------------------
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 41ddcee..5e1c873 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<String, Metric> getMetrics();
+  /**
+   * A map of metric names to metrics.
+   *
+   * @return the metrics
+   */
+  Map<String, Metric> getMetrics();
 }


Mime
View raw message