You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2017/12/20 22:33:16 UTC

hbase git commit: HBASE-19566 Fixed Checkstyle errors in hbase-archetypes and enabled Checkstyle to fail on violations

Repository: hbase
Updated Branches:
  refs/heads/master 4d71f4e32 -> d95cf54ba


HBASE-19566 Fixed Checkstyle errors in hbase-archetypes 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/d95cf54b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d95cf54b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d95cf54b

Branch: refs/heads/master
Commit: d95cf54ba644b18e35a4d88334c674df83e01c7f
Parents: 4d71f4e
Author: Jan Hentschel <ja...@ultratendency.com>
Authored: Wed Dec 20 18:04:56 2017 +0100
Committer: Jan Hentschel <ja...@ultratendency.com>
Committed: Wed Dec 20 23:20:21 2017 +0100

----------------------------------------------------------------------
 .../exemplars/client/TestHelloHBase.java         | 19 ++++++++-----------
 .../exemplars/shaded_client/TestHelloHBase.java  | 19 ++++++++-----------
 hbase-archetypes/pom.xml                         | 16 ++++++++++++++++
 3 files changed, 32 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d95cf54b/hbase-archetypes/hbase-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/client/TestHelloHBase.java
----------------------------------------------------------------------
diff --git a/hbase-archetypes/hbase-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/client/TestHelloHBase.java b/hbase-archetypes/hbase-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/client/TestHelloHBase.java
index 4d20919..be028be 100644
--- a/hbase-archetypes/hbase-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/client/TestHelloHBase.java
+++ b/hbase-archetypes/hbase-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/client/TestHelloHBase.java
@@ -18,7 +18,10 @@
  */
 package org.apache.hbase.archetypes.exemplars.client;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.IOException;
+
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.client.Admin;
@@ -29,7 +32,6 @@ import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.junit.AfterClass;
-import static org.junit.Assert.assertEquals;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -64,8 +66,7 @@ public class TestHelloHBase {
     assertEquals("#namespaceExists failed: found nonexistent namespace.",
             false, exists);
 
-    admin.createNamespace
-        (NamespaceDescriptor.create(EXISTING_NAMESPACE).build());
+    admin.createNamespace(NamespaceDescriptor.create(EXISTING_NAMESPACE).build());
     exists = HelloHBase.namespaceExists(admin, EXISTING_NAMESPACE);
     assertEquals("#namespaceExists failed: did NOT find existing namespace.",
             true, exists);
@@ -94,11 +95,9 @@ public class TestHelloHBase {
   @Test
   public void testPutRowToTable() throws IOException {
     Admin admin = TEST_UTIL.getAdmin();
-    admin.createNamespace
-        (NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
+    admin.createNamespace(NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
     Table table
-            = TEST_UTIL.createTable
-                (HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
+            = TEST_UTIL.createTable(HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
 
     HelloHBase.putRowToTable(table);
     Result row = table.get(new Get(HelloHBase.MY_ROW_ID));
@@ -111,11 +110,9 @@ public class TestHelloHBase {
   @Test
   public void testDeleteRow() throws IOException {
     Admin admin = TEST_UTIL.getAdmin();
-    admin.createNamespace
-        (NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
+    admin.createNamespace(NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
     Table table
-            = TEST_UTIL.createTable
-                (HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
+            = TEST_UTIL.createTable(HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
 
     table.put(new Put(HelloHBase.MY_ROW_ID).
             addColumn(HelloHBase.MY_COLUMN_FAMILY_NAME,

http://git-wip-us.apache.org/repos/asf/hbase/blob/d95cf54b/hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java
----------------------------------------------------------------------
diff --git a/hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java b/hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java
index e49fbb5..1656e35 100644
--- a/hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java
+++ b/hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java
@@ -18,7 +18,10 @@
  */
 package org.apache.hbase.archetypes.exemplars.shaded_client;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.IOException;
+
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.client.Admin;
@@ -29,7 +32,6 @@ import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.junit.AfterClass;
-import static org.junit.Assert.assertEquals;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -64,8 +66,7 @@ public class TestHelloHBase {
     assertEquals("#namespaceExists failed: found nonexistent namespace.",
             false, exists);
 
-    admin.createNamespace
-        (NamespaceDescriptor.create(EXISTING_NAMESPACE).build());
+    admin.createNamespace(NamespaceDescriptor.create(EXISTING_NAMESPACE).build());
     exists = HelloHBase.namespaceExists(admin, EXISTING_NAMESPACE);
     assertEquals("#namespaceExists failed: did NOT find existing namespace.",
             true, exists);
@@ -94,11 +95,9 @@ public class TestHelloHBase {
   @Test
   public void testPutRowToTable() throws IOException {
     Admin admin = TEST_UTIL.getAdmin();
-    admin.createNamespace
-        (NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
+    admin.createNamespace(NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
     Table table
-            = TEST_UTIL.createTable
-                (HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
+            = TEST_UTIL.createTable(HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
 
     HelloHBase.putRowToTable(table);
     Result row = table.get(new Get(HelloHBase.MY_ROW_ID));
@@ -111,11 +110,9 @@ public class TestHelloHBase {
   @Test
   public void testDeleteRow() throws IOException {
     Admin admin = TEST_UTIL.getAdmin();
-    admin.createNamespace
-        (NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
+    admin.createNamespace(NamespaceDescriptor.create(HelloHBase.MY_NAMESPACE_NAME).build());
     Table table
-            = TEST_UTIL.createTable
-                (HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
+            = TEST_UTIL.createTable(HelloHBase.MY_TABLE_NAME, HelloHBase.MY_COLUMN_FAMILY_NAME);
 
     table.put(new Put(HelloHBase.MY_ROW_ID).
             addColumn(HelloHBase.MY_COLUMN_FAMILY_NAME,

http://git-wip-us.apache.org/repos/asf/hbase/blob/d95cf54b/hbase-archetypes/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-archetypes/pom.xml b/hbase-archetypes/pom.xml
index b0576ef..58ac89a 100644
--- a/hbase-archetypes/pom.xml
+++ b/hbase-archetypes/pom.xml
@@ -78,6 +78,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>
 </project>