Skip to content

Commit 13fe0d0

Browse files
tamaashueolivelli
authored andcommitted
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
1 parent 8654e7e commit 13fe0d0

32 files changed

Lines changed: 85 additions & 85 deletions

‎pom.xml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -426,24 +426,24 @@
426426
<surefire-forkcount>8</surefire-forkcount>
427427

428428
<!-- dependency versions -->
429-
<slf4j.version>1.7.25</slf4j.version>
430-
<audience-annotations.version>0.5.0</audience-annotations.version>
429+
<slf4j.version>1.7.30</slf4j.version>
430+
<audience-annotations.version>0.12.0</audience-annotations.version>
431431
<jmockit.version>1.48</jmockit.version>
432432
<junit.version>5.6.2</junit.version>
433433
<junit-platform.version>1.6.2</junit-platform.version>
434434
<log4j.version>1.2.17</log4j.version>
435-
<mockito.version>2.27.0</mockito.version>
435+
<mockito.version>2.28.2</mockito.version>
436436
<hamcrest.version>2.2</hamcrest.version>
437437
<commons-cli.version>1.4</commons-cli.version>
438438
<netty.version>4.1.50.Final</netty.version>
439-
<jetty.version>9.4.24.v20191120</jetty.version>
440-
<jackson.version>2.10.3</jackson.version>
439+
<jetty.version>9.4.32.v20200930</jetty.version>
440+
<jackson.version>2.10.5</jackson.version>
441441
<jline.version>2.14.6</jline.version>
442-
<snappy.version>1.1.7</snappy.version>
442+
<snappy.version>1.1.7.7</snappy.version>
443443
<kerby.version>2.0.0</kerby.version>
444444
<bouncycastle.version>1.60</bouncycastle.version>
445-
<commons-collections.version>3.2.2</commons-collections.version>
446-
<dropwizard.version>3.2.5</dropwizard.version>
445+
<commons-collections.version>4.4</commons-collections.version>
446+
<dropwizard.version>4.1.12.1</dropwizard.version>
447447
<spotbugsannotations.version>4.0.2</spotbugsannotations.version>
448448
<checkstyle.version>8.17</checkstyle.version>
449449
<enforcer.version>3.0.0-M3</enforcer.version>
@@ -462,8 +462,8 @@
462462
<version>${hamcrest.version}</version>
463463
</dependency>
464464
<dependency>
465-
<groupId>commons-collections</groupId>
466-
<artifactId>commons-collections</artifactId>
465+
<groupId>org.apache.commons</groupId>
466+
<artifactId>commons-collections4</artifactId>
467467
<version>${commons-collections.version}</version>
468468
</dependency>
469469
<dependency>

‎zookeeper-contrib/zookeeper-contrib-zooinspector/ivy.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<dependency org="log4j" name="log4j" rev="1.2.17" transitive="false"/>
4141
<dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
4242
<dependency org="org.apache.rat" name="apache-rat-tasks" rev="0.6" conf="releaseaudit->default"/>
43-
<dependency org="commons-collections" name="commons-collections" rev="3.2.2" conf="releaseaudit->default"/>
4443
</dependencies>
4544

4645
</ivy-module>

‎zookeeper-contrib/zookeeper-contrib-zooinspector/pom.xml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,5 @@
8383
<artifactId>apache-rat-tasks</artifactId>
8484
<version>${rat.version}</version>
8585
</dependency>
86-
<dependency>
87-
<groupId>commons-collections</groupId>
88-
<artifactId>commons-collections</artifactId>
89-
</dependency>
9086
</dependencies>
91-
9287
</project>

‎zookeeper-docs/src/main/resources/markdown/zookeeperMonitor.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ All the metrics are included in the `ServerMetrics.java`.
6666
6767
```bash
6868
nohup /tmp/prometheus \
69-
-config.file /tmp/test-zk.yaml \
70-
-web.listen-address ":9090" \
71-
-storage.local.path "test-zk.data" >> /tmp/test-zk.log 2>&1 &
69+
--config.file /tmp/test-zk.yaml \
70+
--web.listen-address ":9090" \
71+
--storage.tsdb.path "/tmp/test-zk.data" >> /tmp/test-zk.log 2>&1 &
7272
```
7373
7474
- Now Prometheus will scrape zk metrics every 10 seconds.

‎zookeeper-metrics-providers/zookeeper-prometheus-metrics/pom.xml‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<description>ZooKeeper Prometheus.io Metrics Provider implementation</description>
3333

3434
<properties>
35-
<prometheus.version>0.6.0</prometheus.version>
35+
<prometheus.version>0.9.0</prometheus.version>
3636
</properties>
3737
<dependencies>
3838
<dependency>
@@ -85,4 +85,28 @@
8585
<scope>test</scope>
8686
</dependency>
8787
</dependencies>
88+
89+
<build>
90+
<plugins>
91+
<plugin>
92+
<groupId>org.apache.maven.plugins</groupId>
93+
<artifactId>maven-dependency-plugin</artifactId>
94+
<executions>
95+
<execution>
96+
<id>copy-dependencies</id>
97+
<phase>package</phase>
98+
<goals>
99+
<goal>copy-dependencies</goal>
100+
</goals>
101+
<configuration>
102+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
103+
<overWriteReleases>false</overWriteReleases>
104+
<overWriteSnapshots>true</overWriteSnapshots>
105+
<excludeTransitive>false</excludeTransitive>
106+
</configuration>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
</plugins>
111+
</build>
88112
</project>

‎zookeeper-server/pom.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>
47-
<groupId>commons-collections</groupId>
48-
<artifactId>commons-collections</artifactId>
47+
<groupId>org.apache.commons</groupId>
48+
<artifactId>commons-collections4</artifactId>
4949
<scope>test</scope>
5050
</dependency>
5151
<dependency>

‎zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ interface StatCallback extends AsyncCallback {
6262
* @param ctx Whatever context object that we passed to asynchronous calls.
6363
* @param stat {@link Stat} object of the node on given path.
6464
*
65-
* @see ZooKeeper#exists(String, boolean, StatCallback, Object)
66-
* @see ZooKeeper#exists(String, Watcher, StatCallback, Object)
67-
* @see ZooKeeper#setData(String, byte[], int, StatCallback, Object)
68-
* @see ZooKeeper#setACL(String, List, int, StatCallback, Object)
65+
* @see ZooKeeper#exists(String, boolean, AsyncCallback.StatCallback, Object)
66+
* @see ZooKeeper#exists(String, Watcher, AsyncCallback.StatCallback, Object)
67+
* @see ZooKeeper#setData(String, byte[], int, AsyncCallback.StatCallback, Object)
68+
* @see ZooKeeper#setACL(String, List, int, AsyncCallback.StatCallback, Object)
6969
*/
7070
void processResult(int rc, String path, Object ctx, Stat stat);
7171

@@ -84,7 +84,7 @@ interface AllChildrenNumberCallback extends AsyncCallback {
8484
* @param ctx Whatever context object that we passed to asynchronous calls.
8585
* @param number The number of children nodes under a specific path.
8686
*
87-
* @see ZooKeeper#getAllChildrenNumber(String, AllChildrenNumberCallback, Object)
87+
* @see ZooKeeper#getAllChildrenNumber(String, AsyncCallback.AllChildrenNumberCallback, Object)
8888
*/
8989
void processResult(int rc, String path, Object ctx, int number);
9090

@@ -113,10 +113,10 @@ interface DataCallback extends AsyncCallback {
113113
* @param data The data of the node.
114114
* @param stat {@link Stat} object of the node on given path.
115115
*
116-
* @see ZooKeeper#getData(String, boolean, DataCallback, Object)
117-
* @see ZooKeeper#getData(String, Watcher, DataCallback, Object)
118-
* @see ZooKeeper#getConfig(boolean, DataCallback, Object)
119-
* @see ZooKeeper#getConfig(Watcher, DataCallback, Object)
116+
* @see ZooKeeper#getData(String, boolean, AsyncCallback.DataCallback, Object)
117+
* @see ZooKeeper#getData(String, Watcher, AsyncCallback.DataCallback, Object)
118+
* @see ZooKeeper#getConfig(boolean, AsyncCallback.DataCallback, Object)
119+
* @see ZooKeeper#getConfig(Watcher, AsyncCallback.DataCallback, Object)
120120
*/
121121
void processResult(int rc, String path, Object ctx, byte[] data, Stat stat);
122122

@@ -145,7 +145,7 @@ interface ACLCallback extends AsyncCallback {
145145
* @param acl ACL Id in {@link ZooDefs.Ids}.
146146
* @param stat {@link Stat} object of the node on given path.
147147
*
148-
* @see ZooKeeper#getACL(String, Stat, ACLCallback, Object)
148+
* @see ZooKeeper#getACL(String, Stat, AsyncCallback.ACLCallback, Object)
149149
*/
150150
void processResult(int rc, String path, Object ctx, List<ACL> acl, Stat stat);
151151

@@ -173,8 +173,8 @@ interface ChildrenCallback extends AsyncCallback {
173173
* @param ctx Whatever context object that we passed to asynchronous calls.
174174
* @param children An unordered array of children of the node on given path.
175175
*
176-
* @see ZooKeeper#getChildren(String, boolean, ChildrenCallback, Object)
177-
* @see ZooKeeper#getChildren(String, Watcher, ChildrenCallback, Object)
176+
* @see ZooKeeper#getChildren(String, boolean, AsyncCallback.ChildrenCallback, Object)
177+
* @see ZooKeeper#getChildren(String, Watcher, AsyncCallback.ChildrenCallback, Object)
178178
*/
179179
void processResult(int rc, String path, Object ctx, List<String> children);
180180

@@ -196,8 +196,8 @@ interface Children2Callback extends AsyncCallback {
196196
* @param stat {@link Stat} object of the node on given path.
197197
*
198198
* @see ChildrenCallback
199-
* @see ZooKeeper#getChildren(String, boolean, Children2Callback, Object)
200-
* @see ZooKeeper#getChildren(String, Watcher, Children2Callback, Object)
199+
* @see ZooKeeper#getChildren(String, boolean, AsyncCallback.Children2Callback, Object)
200+
* @see ZooKeeper#getChildren(String, Watcher, AsyncCallback.Children2Callback, Object)
201201
*/
202202
void processResult(int rc, String path, Object ctx, List<String> children, Stat stat);
203203

@@ -221,8 +221,8 @@ interface Create2Callback extends AsyncCallback {
221221
* @param stat {@link Stat} object of the node on given path.
222222
*
223223
* @see StringCallback
224-
* @see ZooKeeper#create(String, byte[], List, CreateMode, Create2Callback, Object)
225-
* @see ZooKeeper#create(String, byte[], List, CreateMode, Create2Callback, Object, long)
224+
* @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.Create2Callback, Object)
225+
* @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.Create2Callback, Object, long)
226226
*/
227227
void processResult(int rc, String path, Object ctx, String name, Stat stat);
228228

@@ -257,15 +257,15 @@ interface StringCallback extends AsyncCallback {
257257
* and <i>path</i> are usually equal, unless a sequential node has
258258
* been created.
259259
*
260-
* @see ZooKeeper#create(String, byte[], List, CreateMode, StringCallback, Object)
260+
* @see ZooKeeper#create(String, byte[], List, CreateMode, AsyncCallback.StringCallback, Object)
261261
*/
262262
void processResult(int rc, String path, Object ctx, String name);
263263

264264
}
265265

266266
/**
267267
* This callback doesn't retrieve anything from the node. It is useful for some APIs
268-
* that doesn't want anything sent back, e.g. {@link ZooKeeper#sync(String, VoidCallback, Object)}.
268+
* that doesn't want anything sent back, e.g. {@link ZooKeeper#sync(String, AsyncCallback.VoidCallback, Object)}.
269269
*/
270270
@InterfaceAudience.Public
271271
interface VoidCallback extends AsyncCallback {
@@ -283,17 +283,17 @@ interface VoidCallback extends AsyncCallback {
283283
* - The given version doesn't match the node's version for some API calls.</li>
284284
* <li>{@link KeeperException.Code#NOTEMPTY}
285285
* - the node has children and some API calls cannot succeed, e.g.
286-
* {@link ZooKeeper#delete(String, int, VoidCallback, Object)}.</li>
286+
* {@link ZooKeeper#delete(String, int, AsyncCallback.VoidCallback, Object)}.</li>
287287
* </ul>
288288
*
289289
* @param rc The return code or the result of the call.
290290
* @param path The path that we passed to asynchronous calls.
291291
* @param ctx Whatever context object that we passed to asynchronous calls.
292292
*
293-
* @see ZooKeeper#delete(String, int, VoidCallback, Object)
294-
* @see ZooKeeper#removeAllWatches(String, Watcher.WatcherType, boolean, VoidCallback, Object)
295-
* @see ZooKeeper#removeWatches(String, Watcher, Watcher.WatcherType, boolean, VoidCallback, Object)
296-
* @see ZooKeeper#sync(String, VoidCallback, Object)
293+
* @see ZooKeeper#delete(String, int, AsyncCallback.VoidCallback, Object)
294+
* @see ZooKeeper#removeAllWatches(String, Watcher.WatcherType, boolean, AsyncCallback.VoidCallback, Object)
295+
* @see ZooKeeper#removeWatches(String, Watcher, Watcher.WatcherType, boolean, AsyncCallback.VoidCallback, Object)
296+
* @see ZooKeeper#sync(String, AsyncCallback.VoidCallback, Object)
297297
*
298298
*/
299299
void processResult(int rc, String path, Object ctx);
@@ -323,7 +323,7 @@ interface MultiCallback extends AsyncCallback {
323323
* @param opResults The list of results. One result for each operation, and the order
324324
* matches that of input.
325325
*
326-
* @see ZooKeeper#multi(Iterable, MultiCallback, Object)
326+
* @see ZooKeeper#multi(Iterable, AsyncCallback.MultiCallback, Object)
327327
*/
328328
void processResult(int rc, String path, Object ctx, List<OpResult> opResults);
329329

@@ -332,8 +332,8 @@ interface MultiCallback extends AsyncCallback {
332332
/**
333333
* This callback is used to process the getEphemerals results from a single getEphemerals call.
334334
*
335-
* @see ZooKeeper#getEphemerals(EphemeralsCallback, Object)
336-
* @see ZooKeeper#getEphemerals(String, EphemeralsCallback, Object)
335+
* @see ZooKeeper#getEphemerals(AsyncCallback.EphemeralsCallback, Object)
336+
* @see ZooKeeper#getEphemerals(String, AsyncCallback.EphemeralsCallback, Object)
337337
*
338338
* @since 3.6.0
339339
*/

‎zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static boolean deleteRecursive(
6565
}
6666

6767
/**
68-
* Same as {@link #deleteRecursive(org.apache.zookeeper.ZooKeeper, java.lang.String, int)
68+
* Same as {@link #deleteRecursive(org.apache.zookeeper.ZooKeeper, java.lang.String, int)}
6969
* kept here for compatibility with 3.5 clients.
7070
*
7171
* @since 3.6.1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class AclParser {
3232
/**
3333
* parse string into list of ACL
3434
* @param aclString
35-
* @return
35+
* @return list of ACL
3636
*/
3737
public static List<ACL> parse(String aclString) {
3838
List<ACL> acl;

‎zookeeper-server/src/main/java/org/apache/zookeeper/cli/CliCommand.java‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,20 @@ public void setZk(ZooKeeper zk) {
7272

7373
/**
7474
* get the string used to call this command
75-
* @return
7675
*/
7776
public String getCmdStr() {
7877
return cmdStr;
7978
}
8079

8180
/**
8281
* get the option string
83-
* @return
8482
*/
8583
public String getOptionStr() {
8684
return optionStr;
8785
}
8886

8987
/**
9088
* get a usage string, contains the command and the options
91-
* @return
9289
*/
9390
public String getUsageStr() {
9491
return cmdStr + " " + optionStr;
@@ -112,7 +109,7 @@ public void addToMap(Map<String, CliCommand> cmdMap) {
112109

113110
/**
114111
*
115-
* @return
112+
* @return true if command has watch option, false otherwise
116113
* @throws CliException
117114
*/
118115
public abstract boolean exec() throws CliException;

0 commit comments

Comments
 (0)