You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/05/25 07:58:40 UTC

[GitHub] sijie closed pull request #1435: Issue #1434: Checkstyle is not executed at some modules

sijie closed pull request #1435: Issue #1434: Checkstyle is not executed at some modules
URL: https://github.com/apache/bookkeeper/pull/1435
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
index 599f4ed9c..ed13b8cdf 100644
--- a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
@@ -42,5 +42,5 @@ mavenJob('bookkeeper_postcommit_master_java8') {
   common_job_properties.setMavenConfig(delegate)
 
   // Maven build project.
-  goals('clean apache-rat:check package spotbugs:check -Ddistributedlog -Dstream -DstreamTests')
+  goals('clean apache-rat:check checkstyle:check package spotbugs:check -Ddistributedlog -Dstream -DstreamTests')
 }
diff --git a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
index 68c4bdec9..006255f63 100644
--- a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
@@ -42,5 +42,5 @@ mavenJob('bookkeeper_postcommit_master_java9') {
   common_job_properties.setMavenConfig(delegate)
 
   // Maven build project.
-  goals('clean apache-rat:check package spotbugs:check -Ddistributedlog -Dstream -DstreamTests')
+  goals('clean apache-rat:check checkstyle:check package spotbugs:check -Ddistributedlog -Dstream -DstreamTests')
 }
diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy
index 58b0a0f81..3586b358a 100644
--- a/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_precommit_java8.groovy
@@ -48,5 +48,5 @@ mavenJob('bookkeeper_precommit_pullrequest_java8') {
   common_job_properties.setMavenConfig(delegate)
 
   // Maven build project
-  goals('clean apache-rat:check package spotbugs:check -Dstream')
+  goals('clean apache-rat:check checkstyle:check package spotbugs:check -Dstream')
 }
diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy b/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy
index b7e62176b..16a8449bd 100644
--- a/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_precommit_java9.groovy
@@ -48,5 +48,5 @@ mavenJob('bookkeeper_precommit_pullrequest_java9') {
   common_job_properties.setMavenConfig(delegate)
 
   // Maven build project
-  goals('clean apache-rat:check package spotbugs:check -Dstream')
+  goals('clean apache-rat:check checkstyle:check package spotbugs:check -Dstream')
 }
diff --git a/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
index 5938e06f0..1a045d460 100644
--- a/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
@@ -43,7 +43,7 @@ freeStyleJob('bookkeeper_release_nightly_snapshot') {
       common_job_properties.setMavenConfig(delegate)
 
       // Maven build project.
-      goals('clean apache-rat:check package spotbugs:check -Dmaven.test.failure.ignore=true deploy -Ddistributedlog -Dstream -DstreamTests -Pdocker')
+      goals('clean apache-rat:check checkstyle:check package spotbugs:check -Dmaven.test.failure.ignore=true deploy -Ddistributedlog -Dstream -DstreamTests -Pdocker')
     }
 
     // publish the docker images
diff --git a/bookkeeper-benchmark/pom.xml b/bookkeeper-benchmark/pom.xml
index 40a937d9a..5a761266b 100644
--- a/bookkeeper-benchmark/pom.xml
+++ b/bookkeeper-benchmark/pom.xml
@@ -40,10 +40,6 @@
           </systemPropertyVariables>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
   <dependencies>
diff --git a/bookkeeper-common/pom.xml b/bookkeeper-common/pom.xml
index 0f09440cd..740f16a5b 100644
--- a/bookkeeper-common/pom.xml
+++ b/bookkeeper-common/pom.xml
@@ -80,10 +80,6 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/bookkeeper-http/http-server/pom.xml b/bookkeeper-http/http-server/pom.xml
index e465a8f9a..fd37334f1 100644
--- a/bookkeeper-http/http-server/pom.xml
+++ b/bookkeeper-http/http-server/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>http-server</artifactId>
   <name>Apache BookKeeper :: Http :: Http Server</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>commons-configuration</groupId>
diff --git a/bookkeeper-http/twitter-http-server/pom.xml b/bookkeeper-http/twitter-http-server/pom.xml
index ae872391f..19a20aa87 100644
--- a/bookkeeper-http/twitter-http-server/pom.xml
+++ b/bookkeeper-http/twitter-http-server/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>twitter-http-server</artifactId>
   <name>Apache BookKeeper :: Bookkeeper Http :: Twitter Http Server</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>com.twitter</groupId>
diff --git a/bookkeeper-http/vertx-http-server/pom.xml b/bookkeeper-http/vertx-http-server/pom.xml
index ea39307c9..7957bff69 100644
--- a/bookkeeper-http/vertx-http-server/pom.xml
+++ b/bookkeeper-http/vertx-http-server/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>vertx-http-server</artifactId>
   <name>Apache BookKeeper :: Bookkeeper Http :: Vertx Http Server</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>io.vertx</groupId>
diff --git a/bookkeeper-server/pom.xml b/bookkeeper-server/pom.xml
index 61d87706e..d90f6bbae 100644
--- a/bookkeeper-server/pom.xml
+++ b/bookkeeper-server/pom.xml
@@ -202,10 +202,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
   <profiles>
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml b/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
index 02c674211..7d668e9a0 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>codahale-metrics-provider</artifactId>
   <name>Apache BookKeeper :: Stats Providers :: Codahale Metrics</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.bookkeeper.stats</groupId>
diff --git a/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml b/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml
index 6754c0899..b6dce530d 100644
--- a/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml
+++ b/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml
@@ -26,15 +26,6 @@
   <groupId>org.apache.bookkeeper.stats</groupId>
   <artifactId>prometheus-metrics-provider</artifactId>
   <name>Apache BookKeeper :: Stats Providers :: Prometheus</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
   <dependencies>
     <dependency>
       <groupId>org.apache.bookkeeper.stats</groupId>
diff --git a/bookkeeper-stats-providers/twitter-finagle-provider/pom.xml b/bookkeeper-stats-providers/twitter-finagle-provider/pom.xml
index 18d7ba5df..58c9a1d20 100644
--- a/bookkeeper-stats-providers/twitter-finagle-provider/pom.xml
+++ b/bookkeeper-stats-providers/twitter-finagle-provider/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>twitter-finagle-provider</artifactId>
   <name>Apache BookKeeper :: Stats Providers :: Twitter Finagle Stats</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.bookkeeper.stats</groupId>
diff --git a/bookkeeper-stats-providers/twitter-ostrich-provider/pom.xml b/bookkeeper-stats-providers/twitter-ostrich-provider/pom.xml
index 3c81dd8da..19b4ccd32 100644
--- a/bookkeeper-stats-providers/twitter-ostrich-provider/pom.xml
+++ b/bookkeeper-stats-providers/twitter-ostrich-provider/pom.xml
@@ -27,14 +27,6 @@
   <artifactId>twitter-ostrich-provider</artifactId>
   <name>Apache BookKeeper :: Stats Providers :: Twitter Ostrich Stats</name>
   <url>http://maven.apache.org</url>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.bookkeeper.stats</groupId>
diff --git a/bookkeeper-stats-providers/twitter-science-provider/pom.xml b/bookkeeper-stats-providers/twitter-science-provider/pom.xml
index bbcc7ec3d..f18daa0ce 100644
--- a/bookkeeper-stats-providers/twitter-science-provider/pom.xml
+++ b/bookkeeper-stats-providers/twitter-science-provider/pom.xml
@@ -26,14 +26,6 @@
   <groupId>org.apache.bookkeeper.stats</groupId>
   <artifactId>twitter-science-provider</artifactId>
   <name>Apache BookKeeper :: Stats Providers :: Twitter Science Stats</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
   <!--
     keep twitter specific dependencies defined in this profile only.
    -->
diff --git a/bookkeeper-stats/pom.xml b/bookkeeper-stats/pom.xml
index 24ff65b39..2fde4b319 100644
--- a/bookkeeper-stats/pom.xml
+++ b/bookkeeper-stats/pom.xml
@@ -28,10 +28,6 @@
   <url>http://maven.apache.org</url>
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
diff --git a/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java b/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java
new file mode 100644
index 000000000..5e1aed56c
--- /dev/null
+++ b/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BookKeeper CLI commands.
+ */
+package org.apache.bookkeeper.tools.cli.commands;
\ No newline at end of file
diff --git a/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java b/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java
new file mode 100644
index 000000000..be470e1f7
--- /dev/null
+++ b/bookkeeper-tools/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BookKeeper CLI.
+ */
+package org.apache.bookkeeper.tools.cli;
\ No newline at end of file
diff --git a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/BookKeeperCLITest.java b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/BookKeeperCLITest.java
index 7a0affe60..22dad5952 100644
--- a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/BookKeeperCLITest.java
+++ b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/BookKeeperCLITest.java
@@ -56,7 +56,7 @@
 import org.powermock.modules.junit4.PowerMockRunner;
 
 /**
- * Unit test of {@link BookKeeperCLI}
+ * Unit test of {@link BookKeeperCLI}.
  */
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({ BookKeeperCLI.class, CmdBase.class })
diff --git a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java
index 20899b710..b2c1d8b34 100644
--- a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java
+++ b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java
@@ -19,7 +19,6 @@
 package org.apache.bookkeeper.tools.cli.commands.bookie;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyObject;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
diff --git a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/cluster/ListBookiesCommandTest.java b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/cluster/ListBookiesCommandTest.java
index 2574c6368..5e7de7d65 100644
--- a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/cluster/ListBookiesCommandTest.java
+++ b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/commands/cluster/ListBookiesCommandTest.java
@@ -155,14 +155,14 @@ private void testCommand(boolean readwrite,
         assertTrue(runner.runArgs(args));
 
         if (readwrite && !readonly) {
-            verifyPrintBookies(3181, 10,1);
-            verifyPrintBookies(4181, 10,0);
+            verifyPrintBookies(3181, 10, 1);
+            verifyPrintBookies(4181, 10, 0);
         } else if (readonly && !readwrite) {
-            verifyPrintBookies(3181, 10,0);
-            verifyPrintBookies(4181, 10,1);
+            verifyPrintBookies(3181, 10, 0);
+            verifyPrintBookies(4181, 10, 1);
         } else {
-            verifyPrintBookies(3181, 10,1);
-            verifyPrintBookies(4181, 10,1);
+            verifyPrintBookies(3181, 10, 1);
+            verifyPrintBookies(4181, 10, 1);
         }
     }
 
diff --git a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java
index b93cf3854..162d244f5 100644
--- a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java
+++ b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java
@@ -28,6 +28,9 @@
 @Slf4j
 public class CommandTestBase {
 
+    /**
+     * Command Runner to run commands inherited from {@link CmdBase}.
+     */
     protected static class CommandRunner extends CmdBase {
 
         public CommandRunner(ServerConfiguration conf, Command command) {
diff --git a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java
index a3dfb9d71..faa8b28ba 100644
--- a/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java
+++ b/bookkeeper-tools/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java
@@ -18,16 +18,12 @@
  */
 package org.apache.bookkeeper.tools.cli.helpers;
 
-import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
-import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.discover.RegistrationClient;
-import org.apache.bookkeeper.util.ReflectionUtils;
 import org.junit.Before;
-import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
diff --git a/circe-checksum/pom.xml b/circe-checksum/pom.xml
index eab4820fe..78733f570 100644
--- a/circe-checksum/pom.xml
+++ b/circe-checksum/pom.xml
@@ -54,10 +54,6 @@
 
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
diff --git a/microbenchmarks/pom.xml b/microbenchmarks/pom.xml
index f6ff8dca8..9a812977e 100644
--- a/microbenchmarks/pom.xml
+++ b/microbenchmarks/pom.xml
@@ -123,6 +123,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 0a98b1f78..780835e38 100644
--- a/pom.xml
+++ b/pom.xml
@@ -919,13 +919,6 @@
       <id>dev</id>
       <build>
         <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-checkstyle-plugin</artifactId>
-            <configuration>
-              <skip>true</skip>
-            </configuration>
-          </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
@@ -946,13 +939,6 @@
       <id>dev-debug</id>
       <build>
         <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-checkstyle-plugin</artifactId>
-            <configuration>
-              <skip>true</skip>
-            </configuration>
-          </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
diff --git a/stream/clients/java/kv/src/main/java/org/apache/bookkeeper/clients/impl/kv/TableRequestProcessor.java b/stream/clients/java/kv/src/main/java/org/apache/bookkeeper/clients/impl/kv/TableRequestProcessor.java
index f5e0bc5fb..e697d3d49 100644
--- a/stream/clients/java/kv/src/main/java/org/apache/bookkeeper/clients/impl/kv/TableRequestProcessor.java
+++ b/stream/clients/java/kv/src/main/java/org/apache/bookkeeper/clients/impl/kv/TableRequestProcessor.java
@@ -18,7 +18,6 @@
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.function.Function;
-import java.util.stream.Stream;
 import org.apache.bookkeeper.clients.exceptions.InternalServerException;
 import org.apache.bookkeeper.clients.impl.channel.StorageServerChannel;
 import org.apache.bookkeeper.clients.impl.container.StorageContainerChannel;
diff --git a/stream/distributedlog/common/pom.xml b/stream/distributedlog/common/pom.xml
index 1b6a851c8..de4c679e1 100644
--- a/stream/distributedlog/common/pom.xml
+++ b/stream/distributedlog/common/pom.xml
@@ -104,10 +104,6 @@
           <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/stream/distributedlog/io/dlfs/pom.xml b/stream/distributedlog/io/dlfs/pom.xml
index 1273da31c..fee4f172e 100644
--- a/stream/distributedlog/io/dlfs/pom.xml
+++ b/stream/distributedlog/io/dlfs/pom.xml
@@ -66,10 +66,6 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/stream/distributedlog/protocol/pom.xml b/stream/distributedlog/protocol/pom.xml
index 39600f6a4..3f97d89a1 100644
--- a/stream/distributedlog/protocol/pom.xml
+++ b/stream/distributedlog/protocol/pom.xml
@@ -53,10 +53,6 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/stream/proto/src/main/java/org/apache/bookkeeper/stream/protocol/util/StorageContainerPlacementPolicy.java b/stream/proto/src/main/java/org/apache/bookkeeper/stream/protocol/util/StorageContainerPlacementPolicy.java
index 340a73197..8ab93a876 100644
--- a/stream/proto/src/main/java/org/apache/bookkeeper/stream/protocol/util/StorageContainerPlacementPolicy.java
+++ b/stream/proto/src/main/java/org/apache/bookkeeper/stream/protocol/util/StorageContainerPlacementPolicy.java
@@ -11,21 +11,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 package org.apache.bookkeeper.stream.protocol.util;
 
 /**
@@ -34,13 +19,29 @@
 @FunctionalInterface
 public interface StorageContainerPlacementPolicy {
 
+    /**
+     * Factory to create placement policy.
+     */
     @FunctionalInterface
     interface Factory {
 
+        /**
+         * Create a placement policy to place ranges to storage containers.
+         *
+         * @return a new placement policy instance.
+         */
         StorageContainerPlacementPolicy newPlacementPolicy();
 
     }
 
+    /**
+     * Placement a stream range (<tt>streamId</tt>/<tt>rangeId</tt>) to
+     * a storage container.
+     *
+     * @param streamId stream id
+     * @param rangeId range id
+     * @return storage container id
+     */
     long placeStreamRange(long streamId, long rangeId);
 
 }
diff --git a/stream/server/pom.xml b/stream/server/pom.xml
index e0bdf09f6..cb52fd93f 100644
--- a/stream/server/pom.xml
+++ b/stream/server/pom.xml
@@ -57,10 +57,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/stream/storage/api/src/main/java/org/apache/bookkeeper/stream/storage/conf/StorageConfiguration.java b/stream/storage/api/src/main/java/org/apache/bookkeeper/stream/storage/conf/StorageConfiguration.java
index 0699a13e1..e6e109e19 100644
--- a/stream/storage/api/src/main/java/org/apache/bookkeeper/stream/storage/conf/StorageConfiguration.java
+++ b/stream/storage/api/src/main/java/org/apache/bookkeeper/stream/storage/conf/StorageConfiguration.java
@@ -14,7 +14,6 @@
 package org.apache.bookkeeper.stream.storage.conf;
 
 import java.io.File;
-import java.time.Duration;
 import java.util.concurrent.TimeUnit;
 import org.apache.bookkeeper.common.conf.ComponentConfiguration;
 import org.apache.commons.configuration.CompositeConfiguration;
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/StorageConstants.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/StorageConstants.java
index d6ec8a309..5b1e36a14 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/StorageConstants.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/StorageConstants.java
@@ -21,7 +21,7 @@
 import static org.apache.bookkeeper.util.BookKeeperConstants.AVAILABLE_NODE;
 
 /**
- * Defines the storage constants
+ * Defines the storage constants.
  */
 public final class StorageConstants {
 
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImpl.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImpl.java
index 807bf6974..f117b8b96 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImpl.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImpl.java
@@ -35,6 +35,9 @@
 import org.apache.bookkeeper.stream.storage.impl.sc.StorageContainerController;
 import org.apache.bookkeeper.versioning.Versioned;
 
+/**
+ * A default implementation of {@link ClusterControllerLeader}.
+ */
 @Slf4j
 public class ClusterControllerLeaderImpl implements ClusterControllerLeader, RegistrationListener {
 
@@ -79,7 +82,7 @@
     }
 
     /**
-     * Suspend the controller if the leader disconnects from zookeeper
+     * Suspend the controller if the leader disconnects from zookeeper.
      */
     @Override
     public void suspend() {
@@ -134,8 +137,8 @@ public void processAsLeader() throws Exception {
                 // if the leader is suspended due to losing connection to zookeeper
                 // we don't give leadership until it becomes leader again or being interrupted by curator
                 if (!suspended) {
-                    log.warn("Controller leader encountered exceptions on processing server changes," +
-                        " giving up leadership");
+                    log.warn("Controller leader encountered exceptions on processing server changes,"
+                        + " giving up leadership");
 
                     // stop monitoring the servers
                     this.regClient.unwatchWritableBookies(this);
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcMetaRangeService.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcMetaRangeService.java
index 1e4f6815e..8510ec3b1 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcMetaRangeService.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcMetaRangeService.java
@@ -22,9 +22,9 @@
 import org.apache.bookkeeper.stream.proto.storage.MetaRangeServiceGrpc.MetaRangeServiceImplBase;
 import org.apache.bookkeeper.stream.proto.storage.StorageContainerRequest;
 import org.apache.bookkeeper.stream.proto.storage.StorageContainerResponse;
-import org.apache.bookkeeper.stream.storage.impl.grpc.handler.StorageContainerResponseHandler;
 import org.apache.bookkeeper.stream.storage.api.RangeStore;
 import org.apache.bookkeeper.stream.storage.api.metadata.RangeStoreService;
+import org.apache.bookkeeper.stream.storage.impl.grpc.handler.StorageContainerResponseHandler;
 
 /**
  * The gRPC protocol based range service.
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcRootRangeService.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcRootRangeService.java
index 763a221b9..035ba4b1a 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcRootRangeService.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcRootRangeService.java
@@ -32,8 +32,8 @@
 import org.apache.bookkeeper.stream.proto.storage.GetStreamResponse;
 import org.apache.bookkeeper.stream.proto.storage.RootRangeServiceGrpc.RootRangeServiceImplBase;
 import org.apache.bookkeeper.stream.proto.storage.StatusCode;
-import org.apache.bookkeeper.stream.storage.impl.grpc.handler.ResponseHandler;
 import org.apache.bookkeeper.stream.storage.api.metadata.RangeStoreService;
+import org.apache.bookkeeper.stream.storage.impl.grpc.handler.ResponseHandler;
 
 /**
  * Grpc based root range service.
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcTableService.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcTableService.java
index e86759d4e..39c30cb98 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcTableService.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/grpc/GrpcTableService.java
@@ -22,8 +22,8 @@
 import org.apache.bookkeeper.stream.proto.storage.StorageContainerRequest;
 import org.apache.bookkeeper.stream.proto.storage.StorageContainerResponse;
 import org.apache.bookkeeper.stream.proto.storage.TableServiceGrpc.TableServiceImplBase;
-import org.apache.bookkeeper.stream.storage.impl.grpc.handler.StorageContainerResponseHandler;
 import org.apache.bookkeeper.stream.storage.api.metadata.RangeStoreService;
+import org.apache.bookkeeper.stream.storage.impl.grpc.handler.StorageContainerResponseHandler;
 
 /**
  * The gRPC protocol based k/v service.
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/DefaultStorageContainerController.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/DefaultStorageContainerController.java
index 2a3d70478..c68f4bb1c 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/DefaultStorageContainerController.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/DefaultStorageContainerController.java
@@ -54,7 +54,8 @@
         implements Comparator<Pair<BookieSocketAddress, LinkedList<Long>>> {
 
         @Override
-        public int compare(Pair<BookieSocketAddress, LinkedList<Long>> o1, Pair<BookieSocketAddress, LinkedList<Long>> o2) {
+        public int compare(Pair<BookieSocketAddress, LinkedList<Long>> o1,
+                           Pair<BookieSocketAddress, LinkedList<Long>> o2) {
             int res = Integer.compare(o1.getValue().size(), o2.getValue().size());
             if (0 == res) {
                 // two servers have same number of container
@@ -131,8 +132,8 @@ public ClusterAssignmentData computeIdealState(ClusterMetadata clusterMetadata,
             .collect(Collectors.toSet());
 
         // 5. use an ordered set as priority deque to sort the servers by the number of assigned containers
-        TreeSet<Pair<BookieSocketAddress, LinkedList<Long>>> assignmentQueue
-            = new TreeSet<>(new ServerAssignmentDataComparator());
+        TreeSet<Pair<BookieSocketAddress, LinkedList<Long>>> assignmentQueue =
+            new TreeSet<>(new ServerAssignmentDataComparator());
         for (Map.Entry<BookieSocketAddress, Set<Long>> entry : currentServerAssignments.entrySet()) {
             BookieSocketAddress host = entry.getKey();
 
diff --git a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/ZkStorageContainerManager.java b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/ZkStorageContainerManager.java
index f77244cce..b6350fec1 100644
--- a/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/ZkStorageContainerManager.java
+++ b/stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/sc/ZkStorageContainerManager.java
@@ -265,7 +265,7 @@ private void processMyAssignment(ServerAssignmentData myAssignment) {
             pendingStartStopContainers.add(scId);
             return registry
                 .startStorageContainer(scId)
-                .whenComplete((container, cause ) -> {
+                .whenComplete((container, cause) -> {
                     try {
                         if (null != cause) {
                             log.warn("Failed to start storage container ({})", scId, cause);
diff --git a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImplTest.java b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImplTest.java
index 73d6e17ff..7d1aa31c0 100644
--- a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImplTest.java
+++ b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ClusterControllerLeaderImplTest.java
@@ -71,8 +71,8 @@
     private ExecutorService leaderExecutor;
 
     private final Semaphore coordSem = new Semaphore(0);
-    private final AtomicReference<RegistrationListener> regListenerRef
-        = new AtomicReference<>(null);
+    private final AtomicReference<RegistrationListener> regListenerRef =
+        new AtomicReference<>(null);
     private final CompletableFuture<Void> watchFuture = new CompletableFuture<>();
 
     @Before
diff --git a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterMetadataStoreTest.java b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterMetadataStoreTest.java
index 1c224db3e..e6ca0ba92 100644
--- a/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterMetadataStoreTest.java
+++ b/stream/storage/impl/src/test/java/org/apache/bookkeeper/stream/storage/impl/cluster/ZkClusterMetadataStoreTest.java
@@ -66,7 +66,7 @@ public void setup() {
             zkServers,
             new ExponentialBackoffRetry(200, 10, 5000));
         curatorClient.start();
-        store = new ZkClusterMetadataStore(curatorClient, zkServers,"/" + runtime.getMethodName());
+        store = new ZkClusterMetadataStore(curatorClient, zkServers, "/" + runtime.getMethodName());
         store.initializeCluster(NUM_STORAGE_CONTAINERS);
     }
 
diff --git a/tests/backward-compat/current-server-old-clients/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatOldClients.groovy b/tests/backward-compat/current-server-old-clients/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatOldClients.groovy
index 84f48aad0..a7ab4e320 100644
--- a/tests/backward-compat/current-server-old-clients/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatOldClients.groovy
+++ b/tests/backward-compat/current-server-old-clients/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatOldClients.groovy
@@ -19,9 +19,9 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
-import org.apache.bookkeeper.tests.ThreadReaper
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.ThreadReaper
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/hierarchical-ledger-manager/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatHierarchicalLedgerManager.groovy b/tests/backward-compat/hierarchical-ledger-manager/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatHierarchicalLedgerManager.groovy
index f37614485..6394ff0b3 100644
--- a/tests/backward-compat/hierarchical-ledger-manager/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatHierarchicalLedgerManager.groovy
+++ b/tests/backward-compat/hierarchical-ledger-manager/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatHierarchicalLedgerManager.groovy
@@ -19,8 +19,8 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/hostname-bookieid/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeWithHostnameBookieId.groovy b/tests/backward-compat/hostname-bookieid/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeWithHostnameBookieId.groovy
index b9b2a9eb7..e82cbd89e 100644
--- a/tests/backward-compat/hostname-bookieid/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeWithHostnameBookieId.groovy
+++ b/tests/backward-compat/hostname-bookieid/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeWithHostnameBookieId.groovy
@@ -19,8 +19,8 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/old-cookie-new-cluster/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeOldServerInClusterWithCookies.groovy b/tests/backward-compat/old-cookie-new-cluster/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeOldServerInClusterWithCookies.groovy
index c2d72638e..dff7d4d56 100644
--- a/tests/backward-compat/old-cookie-new-cluster/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeOldServerInClusterWithCookies.groovy
+++ b/tests/backward-compat/old-cookie-new-cluster/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeOldServerInClusterWithCookies.groovy
@@ -19,8 +19,8 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/recovery-no-password/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatRecoveryNoPassword.groovy b/tests/backward-compat/recovery-no-password/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatRecoveryNoPassword.groovy
index 87d945865..14243b9d4 100644
--- a/tests/backward-compat/recovery-no-password/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatRecoveryNoPassword.groovy
+++ b/tests/backward-compat/recovery-no-password/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatRecoveryNoPassword.groovy
@@ -20,8 +20,7 @@ package org.apache.bookkeeper.tests.backwardcompat
 import com.github.dockerjava.api.DockerClient
 
 import io.netty.buffer.ByteBuf
-import java.util.ArrayList
-import java.util.HashMap
+
 import java.util.concurrent.CompletableFuture
 import java.util.concurrent.CountDownLatch
 import java.util.concurrent.TimeUnit
@@ -36,9 +35,9 @@ import org.apache.bookkeeper.conf.ClientConfiguration
 import org.apache.bookkeeper.net.BookieSocketAddress
 import org.apache.bookkeeper.proto.BookieProtocol
 import org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryCallback
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.DockerUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.DockerUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/upgrade-direct/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeDirect.groovy b/tests/backward-compat/upgrade-direct/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeDirect.groovy
index 2fe675e14..4a8a95c5f 100644
--- a/tests/backward-compat/upgrade-direct/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeDirect.groovy
+++ b/tests/backward-compat/upgrade-direct/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeDirect.groovy
@@ -19,18 +19,15 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
 
 import org.junit.Assert
-import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.junit.runners.MethodSorters
-
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
diff --git a/tests/backward-compat/upgrade/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgrade.groovy b/tests/backward-compat/upgrade/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgrade.groovy
index 940501df6..1a3f296fb 100644
--- a/tests/backward-compat/upgrade/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgrade.groovy
+++ b/tests/backward-compat/upgrade/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgrade.groovy
@@ -19,8 +19,8 @@ package org.apache.bookkeeper.tests.backwardcompat
 
 import com.github.dockerjava.api.DockerClient
 
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/backward-compat/yahoo-custom-version/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeYahooCustom.groovy b/tests/backward-compat/yahoo-custom-version/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeYahooCustom.groovy
index 2a6b91bd6..18cdec84b 100644
--- a/tests/backward-compat/yahoo-custom-version/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeYahooCustom.groovy
+++ b/tests/backward-compat/yahoo-custom-version/src/test/groovy/org/apache/bookkeeper/tests/backwardcompat/TestCompatUpgradeYahooCustom.groovy
@@ -21,12 +21,11 @@ import static java.nio.charset.StandardCharsets.UTF_8
 
 import com.github.dockerjava.api.DockerClient
 
-import java.util.List
 import java.util.concurrent.CompletableFuture
 import java.util.concurrent.ExecutionException
 import java.util.concurrent.TimeUnit
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils
-import org.apache.bookkeeper.tests.MavenClassLoader
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils
+import org.apache.bookkeeper.tests.integration.utils.MavenClassLoader
 
 import org.jboss.arquillian.junit.Arquillian
 import org.jboss.arquillian.test.api.ArquillianResource
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BKStandaloneContainer.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BKStandaloneContainer.java
index 1288695e0..5f1e4382e 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BKStandaloneContainer.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BKStandaloneContainer.java
@@ -29,7 +29,7 @@
  * Test Container for Bookies.
  */
 @Slf4j
-public class BKStandaloneContainer<SELF extends BKStandaloneContainer<SELF>> extends ChaosContainer<SELF> {
+public class BKStandaloneContainer<SelfT extends BKStandaloneContainer<SelfT>> extends ChaosContainer<SelfT> {
 
     private static final int ZK_PORT = 2181;
     private static final int BOOKIE_BASE_PORT = 3181;
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BookieContainer.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BookieContainer.java
index d70b4f239..10829779f 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BookieContainer.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/BookieContainer.java
@@ -25,15 +25,15 @@
 import java.time.Duration;
 import java.util.Objects;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.tests.DockerUtils;
 import org.apache.bookkeeper.tests.containers.wait.HttpWaitStrategy;
+import org.apache.bookkeeper.tests.integration.utils.DockerUtils;
 import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
 
 /**
  * Test Container for Bookies.
  */
 @Slf4j
-public class BookieContainer<SELF extends BookieContainer<SELF>> extends ChaosContainer<SELF> {
+public class BookieContainer<SelfT extends BookieContainer<SelfT>> extends ChaosContainer<SelfT> {
 
     private static final int BOOKIE_PORT = 3181;
     private static final int BOOKIE_GRPC_PORT = 4181; // stream storage grpc port
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ChaosContainer.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ChaosContainer.java
index 33530f1d5..adc3e277f 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ChaosContainer.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ChaosContainer.java
@@ -34,7 +34,7 @@
  * A base container provides chaos capability.
  */
 @Slf4j
-public class ChaosContainer<SELF extends ChaosContainer<SELF>> extends GenericContainer<SELF> {
+public class ChaosContainer<SelfT extends ChaosContainer<SelfT>> extends GenericContainer<SelfT> {
 
     protected final String clusterName;
 
@@ -45,7 +45,7 @@ protected ChaosContainer(String clusterName, String image) {
 
     public void tailContainerLog() {
         CompletableFuture.runAsync(() -> {
-            while(null == containerId) {
+            while (null == containerId) {
                 try {
                     TimeUnit.MILLISECONDS.sleep(100);
                 } catch (InterruptedException e) {
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/MetadataStoreContainer.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/MetadataStoreContainer.java
index ec8d914ff..32303c72a 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/MetadataStoreContainer.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/MetadataStoreContainer.java
@@ -21,7 +21,8 @@
 /**
  * An abstract class for metadata store container.
  */
-public abstract class MetadataStoreContainer<SELF extends MetadataStoreContainer<SELF>> extends ChaosContainer<SELF> {
+public abstract class MetadataStoreContainer<SelfT extends MetadataStoreContainer<SelfT>>
+        extends ChaosContainer<SelfT> {
     protected MetadataStoreContainer(String clusterName, String image) {
         super(clusterName, image);
     }
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ZKContainer.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ZKContainer.java
index 8f5fb8ac0..4ef6a78bc 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ZKContainer.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/ZKContainer.java
@@ -24,8 +24,11 @@
 import lombok.extern.slf4j.Slf4j;
 import org.apache.bookkeeper.tests.containers.wait.HttpWaitStrategy;
 
+/**
+ * Test container that runs zookeeper.
+ */
 @Slf4j
-public class ZKContainer<SELF extends ZKContainer<SELF>> extends MetadataStoreContainer<SELF> {
+public class ZKContainer<SelfT extends ZKContainer<SelfT>> extends MetadataStoreContainer<SelfT> {
 
     private static final int ZK_PORT = 2181;
     private static final int ZK_HTTP_PORT = 8080;
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/package-info.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/package-info.java
new file mode 100644
index 000000000..f817134e2
--- /dev/null
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Test containers used for running integration tests.
+ */
+package org.apache.bookkeeper.tests.containers;
\ No newline at end of file
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/HttpWaitStrategy.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/HttpWaitStrategy.java
index e70140afa..0304c2047 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/HttpWaitStrategy.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/HttpWaitStrategy.java
@@ -36,7 +36,7 @@
 import org.testcontainers.containers.wait.strategy.AbstractWaitStrategy;
 
 /**
- * Http Strategy
+ * An wait strategy to wait for http ports.
  */
 public class HttpWaitStrategy extends AbstractWaitStrategy {
     @java.lang.SuppressWarnings("all")
@@ -114,7 +114,8 @@ public HttpWaitStrategy withBasicCredentials(String username, String password) {
     }
 
     /**
-     * Waits for the response to pass the given predicate
+     * Waits for the response to pass the given predicate.
+     *
      * @param responsePredicate The predicate to test the response against
      * @return this
      */
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/ZKWaitStrategy.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/ZKWaitStrategy.java
index bd3d9165a..5b4104110 100644
--- a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/ZKWaitStrategy.java
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/ZKWaitStrategy.java
@@ -20,7 +20,7 @@
 
 import java.util.concurrent.TimeUnit;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils;
 import org.rnorth.ducttape.TimeoutException;
 import org.rnorth.ducttape.unreliables.Unreliables;
 import org.testcontainers.containers.ContainerLaunchException;
diff --git a/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/package-info.java b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/package-info.java
new file mode 100644
index 000000000..59628b4c5
--- /dev/null
+++ b/tests/integration-tests-topologies/src/main/java/org/apache/bookkeeper/tests/containers/wait/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Wait strategies for running test containers.
+ */
+package org.apache.bookkeeper.tests.containers.wait;
\ No newline at end of file
diff --git a/tests/integration-tests-topologies/src/main/resources/cube-definitions/3-node-all-version-unstarted.yaml b/tests/integration-tests-topologies/src/main/resources/cube-definitions/3-node-all-version-unstarted.yaml
index a98a32274..c0a2938fc 100644
--- a/tests/integration-tests-topologies/src/main/resources/cube-definitions/3-node-all-version-unstarted.yaml
+++ b/tests/integration-tests-topologies/src/main/resources/cube-definitions/3-node-all-version-unstarted.yaml
@@ -24,41 +24,41 @@ networks:
 zookeeper*:
   image: zookeeper:3.4.11
   await:
-    strategy: org.apache.bookkeeper.tests.ZooKeeperAwaitStrategy
+    strategy: org.apache.bookkeeper.tests.integration.utils.ZooKeeperAwaitStrategy
   aliases:
     - zookeeper
   beforeStop:
     - customBeforeStopAction:
-        strategy: org.apache.bookkeeper.tests.LogToTargetDirStopAction
+        strategy: org.apache.bookkeeper.tests.integration.utils.LogToTargetDirStopAction
   networkMode: testnetwork*
 
 bookkeeper1*:
   image: apachebookkeeper/bookkeeper-all-versions
   await:
-    strategy: org.apache.bookkeeper.tests.NoopAwaitStrategy
+    strategy: org.apache.bookkeeper.tests.integration.utils.NoopAwaitStrategy
   env: [BK_ZKCONNECTSTRING=zookeeper]
   beforeStop:
     - customBeforeStopAction:
-        strategy: org.apache.bookkeeper.tests.BookKeeperLogsToTargetDirStopAction
+        strategy: org.apache.bookkeeper.tests.integration.utils.BookKeeperLogsToTargetDirStopAction
   networkMode: testnetwork*
 
 bookkeeper2*:
   image: apachebookkeeper/bookkeeper-all-versions
   await:
-    strategy: org.apache.bookkeeper.tests.NoopAwaitStrategy
+    strategy: org.apache.bookkeeper.tests.integration.utils.NoopAwaitStrategy
   env: [BK_ZKCONNECTSTRING=zookeeper]
   beforeStop:
     - customBeforeStopAction:
-        strategy: org.apache.bookkeeper.tests.BookKeeperLogsToTargetDirStopAction
+        strategy: org.apache.bookkeeper.tests.integration.utils.BookKeeperLogsToTargetDirStopAction
   networkMode: testnetwork*
 
 bookkeeper3*:
   image: apachebookkeeper/bookkeeper-all-versions
   await:
-    strategy: org.apache.bookkeeper.tests.NoopAwaitStrategy
+    strategy: org.apache.bookkeeper.tests.integration.utils.NoopAwaitStrategy
   env: [BK_ZKCONNECTSTRING=zookeeper]
   beforeStop:
     - customBeforeStopAction:
-        strategy: org.apache.bookkeeper.tests.BookKeeperLogsToTargetDirStopAction
+        strategy: org.apache.bookkeeper.tests.integration.utils.BookKeeperLogsToTargetDirStopAction
   networkMode: testnetwork*
 
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperClusterUtils.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperClusterUtils.java
similarity index 95%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperClusterUtils.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperClusterUtils.java
index 7020fffc0..b0f4e0080 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperClusterUtils.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperClusterUtils.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,36 +7,38 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
 import com.github.dockerjava.api.DockerClient;
 
 import java.io.IOException;
+import java.net.Socket;
 import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
-import java.net.Socket;
 
-import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.ZooDefs.Ids;
 import org.apache.zookeeper.Watcher.Event.KeeperState;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.ZooKeeper;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * Utils for interacting a bookkeeper cluster used for integration tests.
+ */
 public class BookKeeperClusterUtils {
     private static final Logger LOG = LoggerFactory.getLogger(BookKeeperClusterUtils.class);
 
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperLogsToTargetDirStopAction.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperLogsToTargetDirStopAction.java
similarity index 72%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperLogsToTargetDirStopAction.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperLogsToTargetDirStopAction.java
index cab00f8c1..a5fae2d44 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/BookKeeperLogsToTargetDirStopAction.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/BookKeeperLogsToTargetDirStopAction.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,21 +7,23 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import org.arquillian.cube.docker.impl.docker.DockerClientExecutor;
 import org.arquillian.cube.impl.model.CubeId;
 import org.arquillian.cube.spi.beforeStop.BeforeStopAction;
 
+/**
+ * An arquillian stop action that dump container logs to maven target directories.
+ */
 public class BookKeeperLogsToTargetDirStopAction implements BeforeStopAction {
     private DockerClientExecutor dockerClientExecutor;
     private CubeId containerID;
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/DockerUtils.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java
similarity index 90%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/DockerUtils.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java
index 53d6228a6..9b9fb1581 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/DockerUtils.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,30 +7,29 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
 import com.github.dockerjava.api.DockerClient;
 import com.github.dockerjava.api.async.ResultCallback;
 import com.github.dockerjava.api.command.InspectExecResponse;
-import com.github.dockerjava.api.model.Frame;
 import com.github.dockerjava.api.model.ContainerNetwork;
+import com.github.dockerjava.api.model.Frame;
 
 import java.io.Closeable;
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.Arrays;
 import java.util.Map;
 import java.util.Set;
@@ -39,12 +38,15 @@
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
 import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
+import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * Docker utilities for integration tests.
+ */
 public class DockerUtils {
     private static final Logger LOG = LoggerFactory.getLogger(DockerUtils.class);
 
@@ -92,7 +94,7 @@ public void onComplete() {
                         }
                     });
             future.get();
-        } catch (RuntimeException|ExecutionException|IOException e) {
+        } catch (RuntimeException | ExecutionException | IOException e) {
             LOG.error("Error dumping log for {}", containerId, e);
         } catch (InterruptedException ie) {
             Thread.currentThread().interrupt();
@@ -101,7 +103,7 @@ public void onComplete() {
     }
 
     public static void dumpContainerLogDirToTarget(DockerClient docker, String containerId, String path) {
-        final int READ_BLOCK_SIZE = 10000;
+        final int readBlockSize = 10000;
 
         try (InputStream dockerStream = docker.copyArchiveFromContainerCmd(containerId, path).exec();
              TarArchiveInputStream stream = new TarArchiveInputStream(dockerStream)) {
@@ -110,17 +112,17 @@ public static void dumpContainerLogDirToTarget(DockerClient docker, String conta
                 if (entry.isFile()) {
                     File output = new File(getTargetDirectory(containerId), entry.getName().replace("/", "-"));
                     try (FileOutputStream os = new FileOutputStream(output)) {
-                        byte[] block = new byte[READ_BLOCK_SIZE];
-                        int read = stream.read(block, 0, READ_BLOCK_SIZE);
+                        byte[] block = new byte[readBlockSize];
+                        int read = stream.read(block, 0, readBlockSize);
                         while (read > -1) {
                             os.write(block, 0, read);
-                            read = stream.read(block, 0, READ_BLOCK_SIZE);
+                            read = stream.read(block, 0, readBlockSize);
                         }
                     }
                 }
                 entry = stream.getNextTarEntry();
             }
-        } catch (RuntimeException|IOException e) {
+        } catch (RuntimeException | IOException e) {
             LOG.error("Error reading bk logs from container {}", containerId, e);
         }
     }
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/LogToTargetDirStopAction.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/LogToTargetDirStopAction.java
similarity index 69%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/LogToTargetDirStopAction.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/LogToTargetDirStopAction.java
index 24f97615f..47990c77b 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/LogToTargetDirStopAction.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/LogToTargetDirStopAction.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,21 +7,23 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import org.arquillian.cube.docker.impl.docker.DockerClientExecutor;
 import org.arquillian.cube.impl.model.CubeId;
 import org.arquillian.cube.spi.beforeStop.BeforeStopAction;
 
+/**
+ * An arquillian stop action that copy container log to target directory.
+ */
 public class LogToTargetDirStopAction implements BeforeStopAction {
     private DockerClientExecutor dockerClientExecutor;
     private CubeId containerID;
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/MavenClassLoader.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoader.java
similarity index 92%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/MavenClassLoader.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoader.java
index 2c3bb30d8..3c1d13fc3 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/MavenClassLoader.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoader.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,17 +7,15 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import com.google.common.collect.Lists;
 
@@ -48,6 +45,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * A maven class loader for resolving and loading maven artifacts.
+ */
 public class MavenClassLoader implements AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(MavenClassLoader.class);
 
@@ -127,7 +127,7 @@ public Object callStaticMethod(String className, String methodName, ArrayList<?>
                     try {
                         Object type = k.getField("TYPE").get(null);
                         if (type instanceof Class<?>) {
-                            return (Class<?>)type;
+                            return (Class<?>) type;
                         } else {
                             return k;
                         }
@@ -153,7 +153,8 @@ public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
                                                   return closure.call(args);
                                               } else {
                                                   final Class<?> declaringClass = m.getDeclaringClass();
-                                                  return constructor.newInstance(declaringClass, MethodHandles.Lookup.PRIVATE)
+                                                  return constructor.newInstance(
+                                                      declaringClass, MethodHandles.Lookup.PRIVATE)
                                                       .unreflectSpecial(m, declaringClass)
                                                       .bindTo(proxy)
                                                       .invokeWithArguments(args);
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/NoopAwaitStrategy.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/NoopAwaitStrategy.java
similarity index 56%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/NoopAwaitStrategy.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/NoopAwaitStrategy.java
index 6df8167be..b8cb66be0 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/NoopAwaitStrategy.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/NoopAwaitStrategy.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,20 +7,21 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import org.arquillian.cube.spi.await.AwaitStrategy;
 
+/**
+ * A noop arquillian await strategy.
+ */
 public class NoopAwaitStrategy implements AwaitStrategy {
     @Override
     public boolean await() {
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ThreadReaper.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ThreadReaper.java
similarity index 81%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ThreadReaper.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ThreadReaper.java
index abccbd925..fbae638fd 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ThreadReaper.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ThreadReaper.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,17 +7,15 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import java.util.concurrent.Callable;
 import java.util.concurrent.CompletableFuture;
@@ -27,6 +24,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * A thread reaper.
+ */
 public class ThreadReaper {
     private static final Logger LOG = LoggerFactory.getLogger(ThreadReaper.class);
     private static AtomicInteger groupId = new AtomicInteger(0);
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ZooKeeperAwaitStrategy.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ZooKeeperAwaitStrategy.java
similarity index 76%
rename from tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ZooKeeperAwaitStrategy.java
rename to tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ZooKeeperAwaitStrategy.java
index 86d2d699c..b1ed5fa9e 100644
--- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/ZooKeeperAwaitStrategy.java
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/ZooKeeperAwaitStrategy.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,31 +7,30 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import java.util.concurrent.TimeUnit;
 
-import org.arquillian.cube.spi.Cube;
-import org.arquillian.cube.spi.await.AwaitStrategy;
-import org.arquillian.cube.spi.metadata.HasPortBindings;
-import org.arquillian.cube.docker.impl.client.config.Await;
 import org.arquillian.cube.docker.impl.docker.DockerClientExecutor;
 import org.arquillian.cube.docker.impl.util.Ping;
 import org.arquillian.cube.docker.impl.util.PingCommand;
+import org.arquillian.cube.spi.Cube;
+import org.arquillian.cube.spi.await.AwaitStrategy;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * An arquillian await strategy that waits until zookeeper is up running.
+ */
 public class ZooKeeperAwaitStrategy implements AwaitStrategy {
     private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperAwaitStrategy.class);
 
diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/package-info.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/package-info.java
new file mode 100644
index 000000000..d1db6a354
--- /dev/null
+++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Utilities for bookkeeper integration tests.
+ */
+package org.apache.bookkeeper.tests.integration.utils;
\ No newline at end of file
diff --git a/tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/MavenClassLoaderTest.java b/tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoaderTest.java
similarity index 75%
rename from tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/MavenClassLoaderTest.java
rename to tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoaderTest.java
index e4d05336a..c20b2edf4 100644
--- a/tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/MavenClassLoaderTest.java
+++ b/tests/integration-tests-utils/src/test/java/org/apache/bookkeeper/tests/integration/utils/MavenClassLoaderTest.java
@@ -1,5 +1,4 @@
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,25 +7,26 @@
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-package org.apache.bookkeeper.tests;
+package org.apache.bookkeeper.tests.integration.utils;
 
 import com.google.common.collect.Lists;
 
 import org.junit.Assert;
 import org.junit.Test;
 
+/**
+ * Unit test of {@link MavenClassLoader}.
+ */
 public class MavenClassLoaderTest {
-    @Test(expected=ClassNotFoundException.class)
+    @Test(expected = ClassNotFoundException.class)
     public void testLog4JReplacement() throws Exception {
         MavenClassLoader.forBookKeeperVersion("4.0.0")
             .newInstance("org.apache.log4j.Logger");
diff --git a/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/LocationClientTest.java b/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/LocationClientTest.java
index 92e39c3e9..d231ce9d8 100644
--- a/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/LocationClientTest.java
+++ b/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/LocationClientTest.java
@@ -25,7 +25,6 @@
 import com.google.common.collect.Lists;
 import java.util.List;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.clients.config.StorageClientSettings;
 import org.apache.bookkeeper.clients.impl.internal.LocationClientImpl;
 import org.apache.bookkeeper.clients.impl.internal.api.LocationClient;
 import org.apache.bookkeeper.common.util.OrderedScheduler;
diff --git a/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/StorageAdminClientTest.java b/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/StorageAdminClientTest.java
index 569cf7c95..4e39dfa8c 100644
--- a/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/StorageAdminClientTest.java
+++ b/tests/integration/cluster/src/test/java/org/apache/bookkeeper/tests/integration/stream/StorageAdminClientTest.java
@@ -23,21 +23,17 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.apache.bookkeeper.clients.StorageClientBuilder;
 import org.apache.bookkeeper.clients.admin.StorageAdminClient;
-import org.apache.bookkeeper.clients.config.StorageClientSettings;
 import org.apache.bookkeeper.clients.exceptions.ClientException;
 import org.apache.bookkeeper.clients.exceptions.NamespaceExistsException;
 import org.apache.bookkeeper.clients.exceptions.NamespaceNotFoundException;
 import org.apache.bookkeeper.clients.exceptions.StreamExistsException;
 import org.apache.bookkeeper.clients.exceptions.StreamNotFoundException;
 import org.apache.bookkeeper.common.concurrent.FutureUtils;
-import org.apache.bookkeeper.common.util.OrderedScheduler;
 import org.apache.bookkeeper.stream.proto.NamespaceConfiguration;
 import org.apache.bookkeeper.stream.proto.NamespaceProperties;
 import org.apache.bookkeeper.stream.proto.StreamConfiguration;
 import org.apache.bookkeeper.stream.proto.StreamProperties;
-import org.apache.bookkeeper.stream.proto.common.Endpoint;
 import org.apache.bookkeeper.stream.proto.storage.StatusCode;
 import org.junit.After;
 import org.junit.Before;
diff --git a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/BookieShellTestBase.java b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/BookieShellTestBase.java
index f1a58ed10..276b842f6 100644
--- a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/BookieShellTestBase.java
+++ b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/BookieShellTestBase.java
@@ -24,6 +24,9 @@
 import org.junit.Before;
 import org.junit.Test;
 
+/**
+ * Test Base for testing bookie shell scripts.
+ */
 @Slf4j
 public abstract class BookieShellTestBase {
 
diff --git a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestBookieShellCluster.java b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestBookieShellCluster.java
index 04b950a41..8b138c7b4 100644
--- a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestBookieShellCluster.java
+++ b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestBookieShellCluster.java
@@ -22,8 +22,8 @@
 
 import com.github.dockerjava.api.DockerClient;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
-import org.apache.bookkeeper.tests.DockerUtils;
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils;
+import org.apache.bookkeeper.tests.integration.utils.DockerUtils;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.junit.FixMethodOrder;
@@ -31,6 +31,9 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 
+/**
+ * Test cluster related commands in bookie shell.
+ */
 @Slf4j
 @RunWith(Arquillian.class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
diff --git a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestCLI.java b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestCLI.java
index 77618088c..27c376cd8 100644
--- a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestCLI.java
+++ b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestCLI.java
@@ -22,8 +22,8 @@
 
 import com.github.dockerjava.api.DockerClient;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
-import org.apache.bookkeeper.tests.DockerUtils;
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils;
+import org.apache.bookkeeper.tests.integration.utils.DockerUtils;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.junit.Before;
@@ -32,6 +32,9 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 
+/**
+ * Test `bin/bookkeeper-cli`.
+ */
 @Slf4j
 @RunWith(Arquillian.class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
diff --git a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestDlogCLI.java b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestDlogCLI.java
index 83ecde61f..34b88c114 100644
--- a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestDlogCLI.java
+++ b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestDlogCLI.java
@@ -25,8 +25,8 @@
 import java.util.HashSet;
 import java.util.Set;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
-import org.apache.bookkeeper.tests.DockerUtils;
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils;
+import org.apache.bookkeeper.tests.integration.utils.DockerUtils;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.junit.Before;
@@ -35,6 +35,9 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 
+/**
+ * Test `bin/dlog`.
+ */
 @Slf4j
 @RunWith(Arquillian.class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
diff --git a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
index 8ecf28be8..2662b18f9 100644
--- a/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
+++ b/tests/integration/smoke/src/test/java/org/apache/bookkeeper/tests/integration/TestSmoke.java
@@ -41,7 +41,7 @@
 import org.apache.bookkeeper.client.LedgerHandle;
 import org.apache.bookkeeper.common.concurrent.FutureUtils;
 import org.apache.bookkeeper.conf.ClientConfiguration;
-import org.apache.bookkeeper.tests.BookKeeperClusterUtils;
+import org.apache.bookkeeper.tests.integration.utils.BookKeeperClusterUtils;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
 import org.junit.Assert;
@@ -50,11 +50,14 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 
+/**
+ * Smoke tests for ledger apis.
+ */
 @Slf4j
 @RunWith(Arquillian.class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 public class TestSmoke {
-    private static byte[] PASSWD = "foobar".getBytes();
+    private static final byte[] PASSWD = "foobar".getBytes();
 
     @ArquillianResource
     DockerClient docker;
diff --git a/tests/shaded/bookkeeper-server-shaded-test/pom.xml b/tests/shaded/bookkeeper-server-shaded-test/pom.xml
index d17fa1f61..9a8d95d42 100644
--- a/tests/shaded/bookkeeper-server-shaded-test/pom.xml
+++ b/tests/shaded/bookkeeper-server-shaded-test/pom.xml
@@ -57,10 +57,6 @@
         <artifactId>maven-compiler-plugin</artifactId>
         <version>${maven-compiler-plugin.version}</version>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/tests/shaded/bookkeeper-server-tests-shaded-test/pom.xml b/tests/shaded/bookkeeper-server-tests-shaded-test/pom.xml
index 6f6fbd423..81fcbb026 100644
--- a/tests/shaded/bookkeeper-server-tests-shaded-test/pom.xml
+++ b/tests/shaded/bookkeeper-server-tests-shaded-test/pom.xml
@@ -73,10 +73,6 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/tests/shaded/distributedlog-core-shaded-test/pom.xml b/tests/shaded/distributedlog-core-shaded-test/pom.xml
index 39b6e022e..647676f46 100644
--- a/tests/shaded/distributedlog-core-shaded-test/pom.xml
+++ b/tests/shaded/distributedlog-core-shaded-test/pom.xml
@@ -77,13 +77,6 @@
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <suppressionsLocation>distributedlog/suppressions.xml</suppressionsLocation>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 </project>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services