Procházet zdrojové kódy

ZOOKEEPER-3958: Update dependency versions and eliminate java docs wa…

…rnings

We have quite many outdated dependency which can be updated and also a few warnings during the build of JavaDocs.

Author: Tamas Penzes <tamaas@cloudera.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Andor Molnar <anmolnar@apache.org>, Mate Szalay-Beko <symat@apache.org>

Closes #1485 from tamaashu/ZOOKEEPER-3958
Tamas Penzes před 4 roky
rodič
revize
13fe0d0ffb
32 změnil soubory, kde provedl 85 přidání a 85 odebrání
  1. 10 10
      pom.xml
  2. 0 1
      zookeeper-contrib/zookeeper-contrib-zooinspector/ivy.xml
  3. 0 5
      zookeeper-contrib/zookeeper-contrib-zooinspector/pom.xml
  4. 3 3
      zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md
  5. 25 1
      zookeeper-metrics-providers/zookeeper-prometheus-metrics/pom.xml
  6. 2 2
      zookeeper-server/pom.xml
  7. 26 26
      zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java
  8. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
  9. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/cli/AclParser.java
  10. 1 4
      zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java
  11. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/jmx/ManagedUtil.java
  12. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java
  13. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java
  14. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java
  15. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java
  16. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/Util.java
  17. 3 5
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java
  18. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
  19. 0 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java
  20. 1 1
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerMaster.java
  21. 0 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
  22. 2 2
      zookeeper-server/src/main/java/org/apache/zookeeper/server/util/CircularBuffer.java
  23. 4 9
      zookeeper-server/src/main/resources/LICENSE.txt
  24. 0 0
      zookeeper-server/src/main/resources/lib/metrics-core-4.1.12.1.jar_LICENSE.txt
  25. 0 0
      zookeeper-server/src/main/resources/lib/simpleclient-0.9.0.LICENSE.txt
  26. 0 0
      zookeeper-server/src/main/resources/lib/simpleclient_common-0.9.0_LICENSE.txt
  27. 0 0
      zookeeper-server/src/main/resources/lib/simpleclient_hotspot-0.9.0_LICENSE.txt
  28. 0 0
      zookeeper-server/src/main/resources/lib/simpleclient_servlet-0.9.0_LICENSE.txt
  29. 0 0
      zookeeper-server/src/main/resources/lib/slf4j-1.7.30.LICENSE.txt
  30. 0 0
      zookeeper-server/src/main/resources/lib/snappy-java-1.1.7.7.jar_LICENSE.txt
  31. 1 1
      zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java
  32. 1 2
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/MultipleAddressesTest.java

+ 10 - 10
pom.xml

@@ -426,24 +426,24 @@
     <surefire-forkcount>8</surefire-forkcount>
 
     <!-- dependency versions -->
-    <slf4j.version>1.7.25</slf4j.version>
-    <audience-annotations.version>0.5.0</audience-annotations.version>
+    <slf4j.version>1.7.30</slf4j.version>
+    <audience-annotations.version>0.12.0</audience-annotations.version>
     <jmockit.version>1.48</jmockit.version>
     <junit.version>5.6.2</junit.version>
     <junit-platform.version>1.6.2</junit-platform.version>
     <log4j.version>1.2.17</log4j.version>
-    <mockito.version>2.27.0</mockito.version>
+    <mockito.version>2.28.2</mockito.version>
     <hamcrest.version>2.2</hamcrest.version>
     <commons-cli.version>1.4</commons-cli.version>
     <netty.version>4.1.50.Final</netty.version>
-    <jetty.version>9.4.24.v20191120</jetty.version>
-    <jackson.version>2.10.3</jackson.version>
+    <jetty.version>9.4.32.v20200930</jetty.version>
+    <jackson.version>2.10.5</jackson.version>
     <jline.version>2.14.6</jline.version>
-    <snappy.version>1.1.7</snappy.version>
+    <snappy.version>1.1.7.7</snappy.version>
     <kerby.version>2.0.0</kerby.version>
     <bouncycastle.version>1.60</bouncycastle.version>
-    <commons-collections.version>3.2.2</commons-collections.version>
-    <dropwizard.version>3.2.5</dropwizard.version>
+    <commons-collections.version>4.4</commons-collections.version>
+    <dropwizard.version>4.1.12.1</dropwizard.version>
     <spotbugsannotations.version>4.0.2</spotbugsannotations.version>
     <checkstyle.version>8.17</checkstyle.version>
     <enforcer.version>3.0.0-M3</enforcer.version>
@@ -462,8 +462,8 @@
         <version>${hamcrest.version}</version>
       </dependency>
       <dependency>
-        <groupId>commons-collections</groupId>
-        <artifactId>commons-collections</artifactId>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-collections4</artifactId>
         <version>${commons-collections.version}</version>
       </dependency>
       <dependency>

+ 0 - 1
zookeeper-contrib/zookeeper-contrib-zooinspector/ivy.xml

@@ -40,7 +40,6 @@
     <dependency org="log4j" name="log4j" rev="1.2.17" transitive="false"/>
     <dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
     <dependency org="org.apache.rat" name="apache-rat-tasks" rev="0.6" conf="releaseaudit->default"/>
-    <dependency org="commons-collections" name="commons-collections" rev="3.2.2" conf="releaseaudit->default"/>
   </dependencies>
 
 </ivy-module>

+ 0 - 5
zookeeper-contrib/zookeeper-contrib-zooinspector/pom.xml

@@ -83,10 +83,5 @@
       <artifactId>apache-rat-tasks</artifactId>
       <version>${rat.version}</version>
     </dependency>
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
   </dependencies>
-
 </project>

+ 3 - 3
zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md

@@ -66,9 +66,9 @@ All the metrics are included in the `ServerMetrics.java`.
 
     ```bash
     nohup /tmp/prometheus \
-        -config.file /tmp/test-zk.yaml \
-        -web.listen-address ":9090" \
-        -storage.local.path "test-zk.data" >> /tmp/test-zk.log  2>&1 &
+        --config.file /tmp/test-zk.yaml \
+        --web.listen-address ":9090" \
+        --storage.tsdb.path "/tmp/test-zk.data" >> /tmp/test-zk.log  2>&1 &
     ```
 
 - Now Prometheus will scrape zk metrics every 10 seconds.

+ 25 - 1
zookeeper-metrics-providers/zookeeper-prometheus-metrics/pom.xml

@@ -32,7 +32,7 @@
   <description>ZooKeeper Prometheus.io Metrics Provider implementation</description>
 
   <properties>
-      <prometheus.version>0.6.0</prometheus.version>
+      <prometheus.version>0.9.0</prometheus.version>
   </properties>
   <dependencies>
     <dependency>
@@ -85,4 +85,28 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/lib</outputDirectory>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+              <excludeTransitive>false</excludeTransitive>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

+ 2 - 2
zookeeper-server/pom.xml

@@ -44,8 +44,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-collections4</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

+ 26 - 26
zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java

@@ -62,10 +62,10 @@ public interface AsyncCallback {
          * @param ctx  Whatever context object that we passed to asynchronous calls.
          * @param stat {@link Stat} object of the node on given path.
          *
-         * @see ZooKeeper#exists(String, boolean, StatCallback, Object)
-         * @see ZooKeeper#exists(String, Watcher, StatCallback, Object)
-         * @see ZooKeeper#setData(String, byte[], int, StatCallback, Object)
-         * @see ZooKeeper#setACL(String, List, int, StatCallback, Object)
+         * @see ZooKeeper#exists(String, boolean, AsyncCallback.StatCallback, Object)
+         * @see ZooKeeper#exists(String, Watcher, AsyncCallback.StatCallback, Object)
+         * @see ZooKeeper#setData(String, byte[], int, AsyncCallback.StatCallback, Object)
+         * @see ZooKeeper#setACL(String, List, int, AsyncCallback.StatCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, Stat stat);
 
@@ -84,7 +84,7 @@ public interface AsyncCallback {
          * @param ctx     Whatever context object that we passed to asynchronous calls.
          * @param number  The number of children nodes under a specific path.
          *
-         * @see ZooKeeper#getAllChildrenNumber(String, AllChildrenNumberCallback, Object)
+         * @see ZooKeeper#getAllChildrenNumber(String, AsyncCallback.AllChildrenNumberCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, int number);
 
@@ -113,10 +113,10 @@ public interface AsyncCallback {
          * @param data The data of the node.
          * @param stat {@link Stat} object of the node on given path.
          *
-         * @see ZooKeeper#getData(String, boolean, DataCallback, Object)
-         * @see ZooKeeper#getData(String, Watcher, DataCallback, Object)
-         * @see ZooKeeper#getConfig(boolean, DataCallback, Object)
-         * @see ZooKeeper#getConfig(Watcher, DataCallback, Object)
+         * @see ZooKeeper#getData(String, boolean, AsyncCallback.DataCallback, Object)
+         * @see ZooKeeper#getData(String, Watcher, AsyncCallback.DataCallback, Object)
+         * @see ZooKeeper#getConfig(boolean, AsyncCallback.DataCallback, Object)
+         * @see ZooKeeper#getConfig(Watcher, AsyncCallback.DataCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, byte[] data, Stat stat);
 
@@ -145,7 +145,7 @@ public interface AsyncCallback {
          * @param acl  ACL Id in {@link ZooDefs.Ids}.
          * @param stat {@link Stat} object of the node on given path.
          *
-         * @see ZooKeeper#getACL(String, Stat, ACLCallback, Object)
+         * @see ZooKeeper#getACL(String, Stat, AsyncCallback.ACLCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat);
 
@@ -173,8 +173,8 @@ public interface AsyncCallback {
          * @param ctx      Whatever context object that we passed to asynchronous calls.
          * @param children An unordered array of children of the node on given path.
          *
-         * @see ZooKeeper#getChildren(String, boolean, ChildrenCallback, Object)
-         * @see ZooKeeper#getChildren(String, Watcher, ChildrenCallback, Object)
+         * @see ZooKeeper#getChildren(String, boolean, AsyncCallback.ChildrenCallback, Object)
+         * @see ZooKeeper#getChildren(String, Watcher, AsyncCallback.ChildrenCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, List<String> children);
 
@@ -196,8 +196,8 @@ public interface AsyncCallback {
          * @param stat     {@link Stat} object of the node on given path.
          *
          * @see ChildrenCallback
-         * @see ZooKeeper#getChildren(String, boolean, Children2Callback, Object)
-         * @see ZooKeeper#getChildren(String, Watcher, Children2Callback, Object)
+         * @see ZooKeeper#getChildren(String, boolean, AsyncCallback.Children2Callback, Object)
+         * @see ZooKeeper#getChildren(String, Watcher, AsyncCallback.Children2Callback, Object)
          */
         void processResult(int rc, String path, Object ctx, List<String> children, Stat stat);
 
@@ -221,8 +221,8 @@ public interface AsyncCallback {
          * @param stat {@link Stat} object of the node on given path.
          *
          * @see StringCallback
-         * @see ZooKeeper#create(String, byte[], List, CreateMode, Create2Callback, Object)
-         * @see ZooKeeper#create(String, byte[], List, CreateMode, Create2Callback, Object, long)
+         * @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.Create2Callback, Object)
+         * @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.Create2Callback, Object, long)
          */
         void processResult(int rc, String path, Object ctx, String name, Stat stat);
 
@@ -257,7 +257,7 @@ public interface AsyncCallback {
          *             and <i>path</i> are usually equal, unless a sequential node has
          *             been created.
          *
-         * @see ZooKeeper#create(String, byte[], List, CreateMode, StringCallback, Object)
+         * @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.StringCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, String name);
 
@@ -265,7 +265,7 @@ public interface AsyncCallback {
 
     /**
      * This callback doesn't retrieve anything from the node. It is useful for some APIs
-     * that doesn't want anything sent back, e.g. {@link ZooKeeper#sync(String, VoidCallback, Object)}.
+     * that doesn't want anything sent back, e.g. {@link ZooKeeper#sync(String, AsyncCallback.VoidCallback, Object)}.
      */
     @InterfaceAudience.Public
     interface VoidCallback extends AsyncCallback {
@@ -283,17 +283,17 @@ public interface AsyncCallback {
          *             - The given version doesn't match the node's version for some API calls.</li>
          *  <li>{@link KeeperException.Code#NOTEMPTY}
          *             - the node has children and some API calls cannot succeed, e.g.
-         *             {@link ZooKeeper#delete(String, int, VoidCallback, Object)}.</li>
+         *             {@link ZooKeeper#delete(String, int, AsyncCallback.VoidCallback, Object)}.</li>
          * </ul>
          *
          * @param rc   The return code or the result of the call.
          * @param path The path that we passed to asynchronous calls.
          * @param ctx  Whatever context object that we passed to asynchronous calls.
          *
-         * @see ZooKeeper#delete(String, int, VoidCallback, Object)
-         * @see ZooKeeper#removeAllWatches(String, Watcher.WatcherType, boolean, VoidCallback, Object)
-         * @see ZooKeeper#removeWatches(String, Watcher, Watcher.WatcherType, boolean, VoidCallback, Object)
-         * @see ZooKeeper#sync(String, VoidCallback, Object)
+         * @see ZooKeeper#delete(String, int, AsyncCallback.VoidCallback, Object)
+         * @see ZooKeeper#removeAllWatches(String, Watcher.WatcherType, boolean, AsyncCallback.VoidCallback, Object)
+         * @see ZooKeeper#removeWatches(String, Watcher, Watcher.WatcherType, boolean, AsyncCallback.VoidCallback, Object)
+         * @see ZooKeeper#sync(String, AsyncCallback.VoidCallback, Object)
          *
          */
         void processResult(int rc, String path, Object ctx);
@@ -323,7 +323,7 @@ public interface AsyncCallback {
          * @param opResults The list of results. One result for each operation, and the order
          *                  matches that of input.
          *
-         * @see ZooKeeper#multi(Iterable, MultiCallback, Object)
+         * @see ZooKeeper#multi(Iterable, AsyncCallback.MultiCallback, Object)
          */
         void processResult(int rc, String path, Object ctx, List<OpResult> opResults);
 
@@ -332,8 +332,8 @@ public interface AsyncCallback {
     /**
      * This callback is used to process the getEphemerals results from a single getEphemerals call.
      *
-     * @see ZooKeeper#getEphemerals(EphemeralsCallback, Object)
-     * @see ZooKeeper#getEphemerals(String, EphemeralsCallback, Object)
+     * @see ZooKeeper#getEphemerals(AsyncCallback.EphemeralsCallback, Object)
+     * @see ZooKeeper#getEphemerals(String, AsyncCallback.EphemeralsCallback, Object)
      *
      * @since 3.6.0
      */

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java

@@ -65,7 +65,7 @@ public class ZKUtil {
     }
 
     /**
-     * Same as {@link #deleteRecursive(org.apache.zookeeper.ZooKeeper, java.lang.String, int)
+     * Same as {@link #deleteRecursive(org.apache.zookeeper.ZooKeeper, java.lang.String, int)}
      * kept here for compatibility with 3.5 clients.
      *
      * @since 3.6.1

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/cli/AclParser.java

@@ -32,7 +32,7 @@ public class AclParser {
     /**
      * parse string into list of ACL
      * @param aclString
-     * @return
+     * @return list of ACL
      */
     public static List<ACL> parse(String aclString) {
         List<ACL> acl;

+ 1 - 4
zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java

@@ -72,7 +72,6 @@ public abstract class CliCommand {
 
     /**
      * get the string used to call this command
-     * @return
      */
     public String getCmdStr() {
         return cmdStr;
@@ -80,7 +79,6 @@ public abstract class CliCommand {
 
     /**
      * get the option string
-     * @return
      */
     public String getOptionStr() {
         return optionStr;
@@ -88,7 +86,6 @@ public abstract class CliCommand {
 
     /**
      * get a usage string, contains the command and the options
-     * @return
      */
     public String getUsageStr() {
         return cmdStr + " " + optionStr;
@@ -112,7 +109,7 @@ public abstract class CliCommand {
 
     /**
      *
-     * @return
+     * @return true if command has watch option, false otherwise
      * @throws CliException
      */
     public abstract boolean exec() throws CliException;

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/jmx/ManagedUtil.java

@@ -53,7 +53,7 @@ public class ManagedUtil {
     /**
      * Register the log4j JMX mbeans. Set system property
      * "zookeeper.jmx.log4j.disable" to true to disable registration.
-     * @see http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/jmx/package-summary.html
+     * @see <a href="http://logging.apache.org/log4j/1.2/apidocs/index.html?org/apache/log4j/jmx/package-summary.html">Log4J 1.2 API docs</a>
      * @throws JMException if registration fails
      */
     @SuppressWarnings("rawtypes")

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java

@@ -508,7 +508,6 @@ public class ZKDatabase {
      * @param path the path being queried
      * @param stat the stat for this path
      * @param watcher the watcher function
-     * @return
      * @throws KeeperException.NoNodeException
      */
     public byte[] getData(String path, Stat stat, Watcher watcher) throws KeeperException.NoNodeException {

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java

@@ -313,7 +313,7 @@ public class FileTxnLog implements TxnLog, Closeable {
      * ascending order.
      * @param logDirList array of files
      * @param snapshotZxid return files at, or before this zxid
-     * @return
+     * @return log files that starts at, or just before, the snapshot and subsequent ones
      */
     public static File[] getLogFiles(File[] logDirList, long snapshotZxid) {
         List<File> files = Util.sortDataDir(logDirList, LOG_FILE_PREFIX, true);

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java

@@ -566,7 +566,7 @@ public class FileTxnSnapLog {
      * file may contain transactions beyond given zxid.
      * @param zxid the zxid that contains logs greater than
      * zxid
-     * @return
+     * @return the snapshot logs which may contain transactions newer than the given zxid
      */
     public File[] getSnapshotLogs(long zxid) {
         return FileTxnLog.getLogFiles(dataDir.listFiles(), zxid);

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java

@@ -210,7 +210,7 @@ public class SnapStream {
      * Detect the stream mode from file name extension
      *
      * @param fileName
-     * @return
+     * @return the stream mode detected
      */
     public static StreamMode getStreamMode(String fileName) {
         String[] splitSnapName = fileName.split("\\.");

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/Util.java

@@ -259,7 +259,6 @@ public class Util {
      * Returns true if fileName is a log file name.
      *
      * @param fileName
-     * @return
      */
     public static boolean isLogFileName(String fileName) {
         return fileName.startsWith(FileTxnLog.LOG_FILE_PREFIX + ".");
@@ -269,7 +268,6 @@ public class Util {
      * Returns true if fileName is a snapshot file name.
      *
      * @param fileName
-     * @return
      */
     public static boolean isSnapshotFileName(String fileName) {
         return fileName.startsWith(FileSnap.SNAPSHOT_FILE_PREFIX + ".");

+ 3 - 5
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java

@@ -263,7 +263,7 @@ public class Leader extends LearnerMaster {
      * Returns true if a quorum in qv is connected and synced with the leader
      * and false otherwise
      *
-     * @param qv, a QuorumVerifier
+     * @param qv is a QuorumVerifier
      */
     public boolean isQuorumSynced(QuorumVerifier qv) {
         HashSet<Long> ids = new HashSet<Long>();
@@ -966,8 +966,8 @@ public class Leader extends LearnerMaster {
      * Keep a count of acks that are received by the leader for a particular
      * proposal
      *
-     * @param zxid, the zxid of the proposal sent out
-     * @param sid, the id of the server that sent the ack
+     * @param sid is the id of the server that sent the ack
+     * @param zxid is the zxid of the proposal sent out
      * @param followerAddr
      */
     @Override
@@ -1192,8 +1192,6 @@ public class Leader extends LearnerMaster {
 
     /**
      * Returns the current epoch of the leader.
-     *
-     * @return
      */
     public long getEpoch() {
         return ZxidUtils.getEpochFromZxid(lastProposed);

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java

@@ -94,7 +94,6 @@ public class Learner {
 
     /**
      * Socket getter
-     * @return
      */
     public Socket getSocket() {
         return sock;

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java

@@ -1134,7 +1134,6 @@ public class LearnerHandler extends ZooKeeperThread {
 
     /**
      * For testing, return packet queue
-     * @return
      */
     public Queue<QuorumPacket> getQueuedPackets() {
         return queuedPackets;

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerMaster.java

@@ -124,7 +124,7 @@ public abstract class LearnerMaster {
      * get the first zxid of the next epoch
      * @param sid learner id
      * @param lastAcceptedEpoch
-     * @return
+     * @return the first zxid of the next epoch
      * @throws InterruptedException
      * @throws IOException
      */

+ 0 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java

@@ -1965,8 +1965,6 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
 
     /**
      * Return syncEnabled.
-     *
-     * @return
      */
     public boolean getSyncEnabled() {
         if (System.getProperty(SYNC_ENABLED) != null) {

+ 2 - 2
zookeeper-server/src/main/java/org/apache/zookeeper/server/util/CircularBuffer.java

@@ -63,9 +63,9 @@ public class CircularBuffer<T> {
 
     /**
      * Reads from the buffer in a FIFO manner.
-     * Returns the oldest element in the buffer if the buffer ie not empty
+     * Returns the oldest element in the buffer if the buffer is not empty
      * Returns null if the buffer is empty
-     * @return
+     * @return the oldest element in the buffer
      */
     public synchronized T take() {
         int newSize = numberOfElements.decrementAndGet();

+ 4 - 9
zookeeper-server/src/main/resources/LICENSE.txt

@@ -206,15 +206,10 @@ This distribution bundles javacc, which is available under the
 3-clause BSD License. For details, see a copy of the license in
 lib/javacc.LICENSE.txt
 
-This distribution bundles jline 2.11, which is available under the
+This distribution bundles jline 2.14.6, which is available under the
 2-clause BSD License. For details, see a copy of the license in
-lib/jline-2.11.LICENSE.txt
+lib/jline-2.14.6.LICENSE.txt
 
-This distribution bundles SLF4J 1.7.5, which is available under the MIT
+This distribution bundles SLF4J 1.7.30, which is available under the MIT
 License. For details, see a copy of the license in
-lib/slf4j-1.7.5.LICENSE.txt
-
-This distribution bundles a modified version of 'JZLib' as part of
-Netty-3.7.0, which is available under the 3-clause BSD licence. For
-details, see a copy of the licence in META-INF/license/LICENSE-jzlib.txt
-as part of the Netty jar in lib/netty-3.7.0.Final.jar.
+lib/slf4j-1.7.30.LICENSE.txt

+ 0 - 0
zookeeper-server/src/main/resources/lib/metrics-core-3.2.5.jar_LICENSE.txt → zookeeper-server/src/main/resources/lib/metrics-core-4.1.12.1.jar_LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/simpleclient-0.6.0.LICENSE.txt → zookeeper-server/src/main/resources/lib/simpleclient-0.9.0.LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/simpleclient_common-0.6.0_LICENSE.txt → zookeeper-server/src/main/resources/lib/simpleclient_common-0.9.0_LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/simpleclient_hotspot-0.6.0_LICENSE.txt → zookeeper-server/src/main/resources/lib/simpleclient_hotspot-0.9.0_LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/simpleclient_servlet-0.6.0_LICENSE.txt → zookeeper-server/src/main/resources/lib/simpleclient_servlet-0.9.0_LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/slf4j-1.7.25.LICENSE.txt → zookeeper-server/src/main/resources/lib/slf4j-1.7.30.LICENSE.txt


+ 0 - 0
zookeeper-server/src/main/resources/lib/snappy-java-1.1.7.jar_LICENSE.txt → zookeeper-server/src/main/resources/lib/snappy-java-1.1.7.7.jar_LICENSE.txt


+ 1 - 1
zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java

@@ -37,7 +37,7 @@ import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.zookeeper.KeeperException.Code;
 import org.apache.zookeeper.Watcher.Event.EventType;
 import org.apache.zookeeper.Watcher.WatcherType;

+ 1 - 2
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/MultipleAddressesTest.java

@@ -35,7 +35,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
-import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.zookeeper.PortAssignment;
 import org.junit.jupiter.api.Test;
 
@@ -56,7 +56,6 @@ public class MultipleAddressesTest {
     public void testGetAllAddresses() {
         List<InetSocketAddress> addresses = getAddressList();
         MultipleAddresses multipleAddresses = new MultipleAddresses(addresses);
-
         assertTrue(CollectionUtils.isEqualCollection(addresses, multipleAddresses.getAllAddresses()));
 
         multipleAddresses.addAddress(addresses.get(1));