diff --git a/bookkeeper-dist/src/assemble/bin-server.xml b/bookkeeper-dist/src/assemble/bin-server.xml index fe74c1d6c1a..eb731e4e160 100644 --- a/bookkeeper-dist/src/assemble/bin-server.xml +++ b/bookkeeper-dist/src/assemble/bin-server.xml @@ -52,7 +52,7 @@ checker-compat-qual-2.5.2/LICENSE google-auth-library-credentials-0.9.0/LICENSE javax.servlet-api-3.1.0/CDDL+GPL-1.1 - netty-4.1.32.Final/* + netty-4.1.50.Final/* protobuf-3.0.0/LICENSE jline-2.11/LICENSE bouncycastle-1.60/LICENSE.html diff --git a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt index 42d3db9e111..68a29f275a9 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt @@ -205,44 +205,46 @@ The following bundled 3rd party jars are distributed under the Apache Software License, Version 2. -- lib/com.fasterxml.jackson.core-jackson-annotations-2.9.7.jar [1] -- lib/com.fasterxml.jackson.core-jackson-core-2.9.7.jar [2] -- lib/com.fasterxml.jackson.core-jackson-databind-2.9.7.jar [3] -- lib/com.google.guava-guava-21.0.jar [4] +- lib/com.fasterxml.jackson.core-jackson-annotations-2.11.0.jar [1] +- lib/com.fasterxml.jackson.core-jackson-core-2.11.0.jar [2] +- lib/com.fasterxml.jackson.core-jackson-databind-2.11.0.jar [3] +- lib/com.google.guava-guava-30.0.jar [4] - lib/commons-cli-commons-cli-1.2.jar [5] - lib/commons-codec-commons-codec-1.6.jar [6] - lib/commons-configuration-commons-configuration-1.10.jar [7] - lib/commons-io-commons-io-2.4.jar [8] - lib/commons-lang-commons-lang-2.6.jar [9] - lib/commons-logging-commons-logging-1.1.1.jar [10] -- lib/io.netty-netty-buffer-4.1.32.Final.jar [11] -- lib/io.netty-netty-codec-4.1.32.Final.jar [11] -- lib/io.netty-netty-codec-dns-4.1.32.Final.jar [11] -- lib/io.netty-netty-codec-http-4.1.32.Final.jar [11] -- lib/io.netty-netty-codec-http2-4.1.32.Final.jar [11] -- lib/io.netty-netty-codec-socks-4.1.32.Final.jar [11] -- lib/io.netty-netty-common-4.1.32.Final.jar [11] -- lib/io.netty-netty-handler-4.1.32.Final.jar [11] -- lib/io.netty-netty-handler-proxy-4.1.32.Final.jar [11] -- lib/io.netty-netty-resolver-4.1.32.Final.jar [11] -- lib/io.netty-netty-resolver-dns-4.1.32.Final.jar [11] -- lib/io.netty-netty-tcnative-boringssl-static-2.0.20.Final.jar [11] -- lib/io.netty-netty-transport-4.1.32.Final.jar [11] -- lib/io.netty-netty-transport-native-epoll-4.1.32.Final-linux-x86_64.jar [11] -- lib/io.netty-netty-transport-native-unix-common-4.1.32.Final.jar [11] -- lib/io.prometheus-simpleclient-0.0.21.jar [12] -- lib/io.prometheus-simpleclient_common-0.0.21.jar [12] -- lib/io.prometheus-simpleclient_hotspot-0.0.21.jar [12] -- lib/io.prometheus-simpleclient_servlet-0.0.21.jar [12] +- lib/io.netty-netty-buffer-4.1.50.Final.jar [11] +- lib/io.netty-netty-codec-4.1.50.Final.jar [11] +- lib/io.netty-netty-codec-dns-4.1.50.Final.jar [11] +- lib/io.netty-netty-codec-http-4.1.50.Final.jar [11] +- lib/io.netty-netty-codec-http2-4.1.50.Final.jar [11] +- lib/io.netty-netty-codec-socks-4.1.50.Final.jar [11] +- lib/io.netty-netty-common-4.1.50.Final.jar [11] +- lib/io.netty-netty-handler-4.1.50.Final.jar [11] +- lib/io.netty-netty-handler-proxy-4.1.50.Final.jar [11] +- lib/io.netty-netty-resolver-4.1.50.Final.jar [11] +- lib/io.netty-netty-resolver-dns-4.1.50.Final.jar [11] +- lib/io.netty-netty-tcnative-boringssl-static-2.0.31.Final.jar [11] +- lib/io.netty-netty-transport-4.1.50.Final.jar [11] +- lib/io.netty-netty-transport-native-epoll-4.1.50.Final-linux-x86_64.jar [11] +- lib/io.netty-netty-transport-native-unix-common-4.1.50.Final.jar [11] +- lib/io.prometheus-simpleclient-0.8.1.jar [12] +- lib/io.prometheus-simpleclient_common-0.8.1.jar [12] +- lib/io.prometheus-simpleclient_hotspot-0.8.1.jar [12] +- lib/io.prometheus-simpleclient_servlet-0.8.1.jar [12] - lib/io.vertx-vertx-auth-common-3.5.3.jar [13] +- lib/io.vertx-vertx-bridge-common-3.5.3.jar [??] - lib/io.vertx-vertx-core-3.5.3.jar [14] - lib/io.vertx-vertx-web-3.5.3.jar [15] - lib/log4j-log4j-1.2.17.jar [16] - lib/net.java.dev.jna-jna-3.2.7.jar [17] - lib/org.apache.commons-commons-collections4-4.1.jar [18] - lib/org.apache.commons-commons-lang3-3.6.jar [19] -- lib/org.apache.zookeeper-zookeeper-3.5.7.jar [20] -- lib/org.apache.zookeeper-zookeeper-jute-3.5.7.jar [20] +- lib/org.apache.zookeeper-zookeeper-3.6.2.jar [20] +- lib/org.apache.zookeeper-zookeeper-jute-3.6.2.jar [20] +- lib/org.apache.zookeeper-zookeeper-3.6.2-tests.jar [20] - lib/org.eclipse.jetty-jetty-http-9.4.33.v20201020.jar [21] - lib/org.eclipse.jetty-jetty-io-9.4.33.v20201020.jar [21] - lib/org.eclipse.jetty-jetty-security-9.4.33.v20201020.jar [21] @@ -256,28 +258,34 @@ Apache Software License, Version 2. - lib/net.jpountz.lz4-lz4-1.3.0.jar [25] - lib/org.codehaus.jackson-jackson-core-asl-1.9.11.jar [26] - lib/org.codehaus.jackson-jackson-mapper-asl-1.9.11.jar [26] -- lib/com.google.api.grpc-proto-google-common-protos-1.12.0.jar [27] +- lib/com.google.api.grpc-proto-google-common-protos-1.17.0.jar [27] - lib/com.google.code.gson-gson-2.7.jar [28] -- lib/io.opencensus-opencensus-api-0.18.0.jar [29] -- lib/io.opencensus-opencensus-contrib-grpc-metrics-0.18.0.jar [29] +- lib/io.opencensus-opencensus-api-0.24.0.jar [29] +- lib/io.opencensus-opencensus-contrib-http-util-0.24.0.jar [29] +- lib/io.opencensus-opencensus-proto-0.2.0.jar [29] - lib/com.squareup.okhttp-okhttp-2.5.0.jar [30] - lib/com.squareup.okio-okio-1.13.0.jar [31] -- lib/io.grpc-grpc-all-1.18.0.jar [32] -- lib/io.grpc-grpc-auth-1.18.0.jar [32] -- lib/io.grpc-grpc-context-1.18.0.jar [32] -- lib/io.grpc-grpc-core-1.18.0.jar [32] -- lib/io.grpc-grpc-netty-1.18.0.jar [32] -- lib/io.grpc-grpc-okhttp-1.18.0.jar [32] -- lib/io.grpc-grpc-protobuf-1.18.0.jar [32] -- lib/io.grpc-grpc-protobuf-lite-1.18.0.jar [32] -- lib/io.grpc-grpc-protobuf-nano-1.18.0.jar [32] -- lib/io.grpc-grpc-stub-1.18.0.jar [32] -- lib/io.grpc-grpc-testing-1.18.0.jar [32] -- lib/org.apache.curator-curator-client-4.0.1.jar [33] -- lib/org.apache.curator-curator-framework-4.0.1.jar [33] -- lib/org.apache.curator-curator-recipes-4.0.1.jar [33] +- lib/io.grpc-grpc-all-1.33.0.jar [32] +- lib/io.grpc-grpc-alts-1.33.0.jar [32] +- lib/io.grpc-grpc-api-1.33.0.jar [32] +- lib/io.grpc-grpc-auth-1.33.0.jar [32] +- lib/io.grpc-grpc-context-1.33.0.jar [32] +- lib/io.grpc-grpc-core-1.33.0.jar [32] +- lib/io.grpc-grpc-grpclb-1.33.0.jar [32] +- lib/io.grpc-grpc-netty-1.33.0.jar [32] +- lib/io.grpc-grpc-netty-shaded-1.33.0.jar [32] +- lib/io.grpc-grpc-okhttp-1.33.0.jar [32] +- lib/io.grpc-grpc-protobuf-1.33.0.jar [32] +- lib/io.grpc-grpc-protobuf-lite-1.33.0.jar [32] +- lib/io.grpc-grpc-services-1.33.0.jar [32] +- lib/io.grpc-grpc-stub-1.33.0.jar [32] +- lib/io.grpc-grpc-testing-1.33.0.jar [32] +- lib/io.grpc-grpc-xds-1.33.0.jar [32] +- lib/org.apache.curator-curator-client-5.1.0.jar [33] +- lib/org.apache.curator-curator-framework-5.1.0.jar [33] +- lib/org.apache.curator-curator-recipes-5.1.0.jar [33] - lib/org.inferred-freebuilder-1.14.9.jar [34] -- lib/com.google.errorprone-error_prone_annotations-2.1.2.jar [35] +- lib/com.google.errorprone-error_prone_annotations-2.4.0.jar [35] - lib/org.apache.yetus-audience-annotations-0.5.0.jar [36] - lib/org.jctools-jctools-core-2.1.2.jar [37] - lib/org.apache.httpcomponents-httpclient-4.5.5.jar [38] @@ -287,15 +295,15 @@ Apache Software License, Version 2. [1] Source available at https://github.com/FasterXML/jackson-annotations/tree/jackson-annotations-2.8.9 [2] Source available at https://github.com/FasterXML/jackson-core/tree/jackson-core-2.8.9 [3] Source available at https://github.com/FasterXML/jackson-databind/tree/jackson-databind-2.9.7 -[4] Source available at https://github.com/google/guava/tree/v21.0 +[4] Source available at https://github.com/google/guava/tree/v30.0 [5] Source available at https://git-wip-us.apache.org/repos/asf?p=commons-cli.git;a=tag;h=bc8f0e [6] Source available at http://svn.apache.org/viewvc/commons/proper/codec/tags/1_6/ [7] Source available at http://svn.apache.org/viewvc/commons/proper/configuration/tags/CONFIGURATION_1_10/ [8] Source available at https://git-wip-us.apache.org/repos/asf?p=commons-io.git;a=tag;h=603579 [9] Source available at https://git-wip-us.apache.org/repos/asf?p=commons-lang.git;a=tag;h=375459 [10] Source available at http://svn.apache.org/viewvc/commons/proper/logging/tags/commons-logging-1.1.1/ -[11] Source available at https://github.com/netty/netty/tree/netty-4.1.32.Final -[12] Source available at https://github.com/prometheus/client_java/tree/parent-0.0.21 +[11] Source available at https://github.com/netty/netty/tree/netty-4.1.50.Final +[12] Source available at https://github.com/prometheus/client_java/tree/parent-0.8.1 [13] Source available at https://github.com/vert-x3/vertx-auth/tree/3.5.3 [14] Source available at https://github.com/eclipse/vert.x/tree/3.5.3 [15] Source available at https://github.com/vert-x3/vertx-web/tree/3.5.3 @@ -303,7 +311,7 @@ Apache Software License, Version 2. [17] Source available at https://github.com/java-native-access/jna/tree/3.2.7 [18] Source available at https://git-wip-us.apache.org/repos/asf?p=commons-collections.git;a=tag;h=a3a5ad [19] Source available at https://git-wip-us.apache.org/repos/asf?p=commons-lang.git;a=shortlog;h=refs/tags/LANG_3_6 -[20] Source available at https://github.com/apache/zookeeper/tree/release-3.5.7 +[20] Source available at https://github.com/apache/zookeeper/tree/release-3.6.2 [21] Source available at https://github.com/eclipse/jetty.project/tree/jetty-9.4.33.v20201020 [22] Source available at https://github.com/facebook/rocksdb/tree/v5.13.1 [23] Source available at https://github.com/cbeust/jcommander/tree/1.78 @@ -312,13 +320,13 @@ Apache Software License, Version 2. [26] Source available at https://github.com/codehaus/jackson/tree/d1c26ec538a8701cff7548009254fd6183b71873 [27] Source available at https://github.com/googleapis/googleapis [28] Source available at https://github.com/google/gson/tree/gson-parent-2.7 -[29] Source available at https://github.com/census-instrumentation/opencensus-java/tree/v0.18.0 +[29] Source available at https://github.com/census-instrumentation/opencensus-java/tree/v0.24.0 [30] Source available at https://github.com/square/okhttp/tree/parent-2.5.0 [31] Source available at https://github.com/square/okio/tree/okio-parent-1.13.0 -[32] Source available at https://github.com/grpc/grpc-java/tree/v1.18.0 +[32] Source available at https://github.com/grpc/grpc-java/tree/v1.33.0 [33] Source available at https://github.com/apache/curator/tree/apache-curator-4.0.1 [34] Source available at https://github.com/inferred/FreeBuilder/tree/v1.14.9 -[35] Source available at https://github.com/google/error-prone/tree/v2.1.2 +[35] Source available at https://github.com/google/error-prone/tree/v2.4.0 [36] Source available at https://github.com/apache/yetus/tree/rel/0.5.0 [37] Source available at https://github.com/JCTools/JCTools/tree/v2.1.2 [38] Source available at https://github.com/apache/httpcomponents-client/tree/rel/v4.4.1 @@ -326,66 +334,232 @@ Apache Software License, Version 2. [30] Source available at https://github.com/apache/thrift/tree/0.9.3 ------------------------------------------------------------------------------------ -lib/io.netty-netty-codec-4.1.32.Final.jar bundles some 3rd party dependencies +lib/io.netty-netty-codec-4.1.50.Final.jar bundles some 3rd party dependencies -lib/io.netty-netty-codec-4.1.32.Final.jar contains the extensions to Java Collections Framework which has +lib/io.netty-netty-codec-4.1.50.Final.jar contains the extensions to Java Collections Framework which has been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.jsr166y.txt (Public Domain) + * deps/netty-4.1.50.Final/LICENSE.jsr166y.txt (Public Domain) * HOMEPAGE: * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ -lib/io.netty-netty-codec-4.1.32.Final.jar contains a modified version of Robert Harder's Public Domain +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified version of Robert Harder's Public Domain Base64 Encoder and Decoder, which can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.base64.txt (Public Domain) + * deps/netty-4.1.50.Final/LICENSE.base64.txt (Public Domain) * HOMEPAGE: * http://iharder.sourceforge.net/current/java/base64/ -lib/io.netty-netty-common-4.1.32.Final.jar contains a modified portion of 'SLF4J', a simple logging +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'Webbit', an event based +WebSocket and HTTP server, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'SLF4J', a simple logging facade for Java, which can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.slf4j.txt (MIT License) + * deps/netty-4.1.50.Final/LICENSE.slf4j.txt (MIT License) * HOMEPAGE: * http://www.slf4j.org/ -lib/io.netty-netty-codec-4.1.32.Final.jar contains a modified portion of 'jbzip2', a Java bzip2 compression +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'Apache Harmony', an open source +Java SE, which can be obtained at: + + * NOTICE: + * deps/netty-4.1.50.Final/NOTICE.harmony.txt + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.harmony.txt (Apache License 2.0) + * HOMEPAGE: + * http://archive.apache.org/dist/harmony/ + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'jbzip2', a Java bzip2 compression and decompression library written by Matthew J. Francis. It can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.jbzip2.txt (MIT License) + * deps/netty-4.1.50.Final/LICENSE.jbzip2.txt (MIT License) * HOMEPAGE: * https://code.google.com/p/jbzip2/ -lib/io.netty-netty-codec-4.1.32.Final.jar contains a modified portion of 'libdivsufsort', a C API library to construct +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'libdivsufsort', a C API library to construct the suffix array and the Burrows-Wheeler transformed string for any input string of a constant-size alphabet written by Yuta Mori. It can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.libdivsufsort.txt (MIT License) + * deps/netty-4.1.50.Final/LICENSE.libdivsufsort.txt (MIT License) * HOMEPAGE: * https://github.com/y-256/libdivsufsort -lib/io.netty-netty-codec-4.1.32.Final.jar contains a modified portion of 'jfastlz', a Java port of FastLZ compression +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of Nitsan Wakart's 'JCTools', +Java Concurrency Tools for the JVM, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.jctools.txt (ASL2 License) + * HOMEPAGE: + * https://github.com/JCTools/JCTools + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'JZlib', a re-implementation of zlib in +pure Java, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.jzlib.txt (BSD style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Compress-LZF', a Java library for encoding and +decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.compress-lzf.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/ning/compress + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'lz4', a LZ4 Java compression +and decompression library written by Adrien Grand. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.lz4.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jpountz/lz4-java + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'lzma-java', a LZMA Java compression +and decompression library, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.lzma-java.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jponge/lzma-java + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'jfastlz', a Java port of FastLZ compression and decompression library written by William Kinney. It can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.jfastlz.txt (MIT License) + * deps/netty-4.1.50.Final/LICENSE.jfastlz.txt (MIT License) * HOMEPAGE: * https://code.google.com/p/jfastlz/ -lib/io.netty-netty-codec-4.1.32.Final.jar contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data -interchange format, which can be obtained at: +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of and optionally depends on 'Protocol Buffers', +Google's data interchange format, which can be obtained at: * LICENSE: - * deps/netty-4.1.32.Final/LICENSE.protobuf.txt (New BSD License) + * deps/netty-4.1.50.Final/LICENSE.protobuf.txt (New BSD License) * HOMEPAGE: * https://github.com/google/protobuf +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Bouncy Castle Crypto APIs' to generate +a temporary self-signed X.509 certificate when the JVM does not provide the +equivalent functionality. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.bouncycastle.txt (MIT License) + * HOMEPAGE: + * http://www.bouncycastle.org/ + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Snappy', a compression library produced +by Google Inc, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.snappy.txt (New BSD License) + * HOMEPAGE: + * https://github.com/google/snappy + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'JBoss Marshalling', an alternative Java +serialization API, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.jboss-marshalling.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/jboss-remoting/jboss-marshalling + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Caliper', Google's micro- +benchmarking framework, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.caliper.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/google/caliper + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Apache Log4J', a logging framework, which +can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +lib/io.netty-netty-codec-4.1.50.Final.jar optionally depends on 'Aalto XML', an ultra-high performance +non-blocking XML processor, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.aalto-xml.txt (Apache License 2.0) + * HOMEPAGE: + * http://wiki.fasterxml.com/AaltoHome + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified version of 'HPACK', a Java implementation of +the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.hpack.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/twitter/hpack + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified version of 'HPACK', a Java implementation of +the HTTP/2 HPACK algorithm written by Cory Benfield. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.hyper-hpack.txt (MIT License) + * HOMEPAGE: + * https://github.com/python-hyper/hpack/ + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified version of 'HPACK', a Java implementation of +the HTTP/2 HPACK algorithm written by Tatsuhiro Tsujikawa. It can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.nghttp2-hpack.txt (MIT License) + * HOMEPAGE: + * https://github.com/nghttp2/nghttp2/ + +lib/io.netty-netty-codec-4.1.50.Final.jar contains a modified portion of 'Apache Commons Lang', a Java library +provides utilities for the java.lang API, which can be obtained at: + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.commons-lang.txt (Apache License 2.0) + * HOMEPAGE: + * https://commons.apache.org/proper/commons-lang/ + + +lib/io.netty-netty-codec-4.1.50.Final.jar contains the Maven wrapper scripts from 'Maven Wrapper', +that provides an easy way to ensure a user has everything necessary to run the Maven build. + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.mvn-wrapper.txt (Apache License 2.0) + * HOMEPAGE: + * https://github.com/takari/maven-wrapper + +lib/io.netty-netty-codec-4.1.50.Final.jar contains the dnsinfo.h header file, +that provides a way to retrieve the system DNS configuration on MacOS. +This private header is also used by Apple's open source + mDNSResponder (https://opensource.apple.com/tarballs/mDNSResponder/). + + * LICENSE: + * deps/netty-4.1.50.Final/LICENSE.dnsinfo.txt (Apache License 2.0) + * HOMEPAGE: + * http://www.opensource.apple.com/source/configd/configd-453.19/dnsinfo/dnsinfo.h + ------------------------------------------------------------------------------------ lib/org.rocksdb-rocksdbjni-5.13.1.jar is derived from leveldb, which is under the following license. @@ -422,19 +596,19 @@ This product bundles Google Protocol Buffers, which is available under a "3-clau license. Bundled as - - lib/com.google.protobuf-protobuf-java-3.5.1.jar -Source available at https://github.com/google/protobuf/tree/v3.5.1 -For details, see deps/protobuf-3.5.1/LICENSE. + - lib/com.google.protobuf-protobuf-java-3.14.0.jar +Source available at https://github.com/google/protobuf/tree/v3.14.0 +For details, see deps/protobuf-3.14.0/LICENSE. Bundled as lib/com.google.protobuf.nano-protobuf-javanano-3.0.0-alpha-5.jar Source available at https://github.com/google/protobuf/tree/3.0.0-pre For details, see deps/protobuf-3.0.0/LICENSE. ------------------------------------------------------------------------------------ This product bundles the JCP Standard Java Servlet API, which is available under a -CDDL 1.1 license. For details, see deps/javax.servlet-api-3.1.0/CDDL+GPL-1.1. +CDDL 1.1 license. For details, see deps/javax.servlet-api-4.0.0/CDDL+GPL-1.1. -Bundled as lib/javax.servlet-javax.servlet-api-3.1.0.jar -Source available at https://github.com/javaee/servlet-spec/tree/3.1.0 +Bundled as lib/javax.servlet-javax.servlet-api-4.0.0.jar +Source available at https://github.com/javaee/servlet-spec/tree/4.0.0 ------------------------------------------------------------------------------------ This product bundles Simple Logging Facade for Java, which is available under a MIT license. For details, see deps/slf4j-1.7.25/LICENSE.txt. @@ -448,8 +622,9 @@ This product bundles the Google Auth Library, which is available under a "3-clau license. For details, see deps/google-auth-library-credentials-0.9.0/LICENSE Bundled as - - lib/com.google.auth-google-auth-library-credentials-0.9.0.jar -Source available at https://github.com/google/google-auth-library-java/tree/0.9.0 + - lib/com.google.auth-google-auth-library-credentials-0.20.0.jar + - lib/com.google.auth-google-auth-library-oauth2-http-0.20.0.jar +Source available at https://github.com/google/google-auth-library-java/tree/0.20.0 ------------------------------------------------------------------------------------ This product bundles the JLine Library, which is available under a "2-clause BSD" license. For details, see deps/jline-2.11/LICENSE diff --git a/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt b/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt index 6dbc7ad683f..6964b339f25 100644 --- a/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt +++ b/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt @@ -5,21 +5,21 @@ This product includes software developed at The Apache Software Foundation (http://www.apache.org/). ------------------------------------------------------------------------------------ -- lib/io.netty-netty-buffer-4.1.32.Final.jar -- lib/io.netty-netty-codec-4.1.32.Final.jar -- lib/io.netty-netty-codec-dns-4.1.32.Final.jar -- lib/io.netty-netty-codec-http-4.1.32.Final.jar -- lib/io.netty-netty-codec-http2-4.1.32.Final.jar -- lib/io.netty-netty-codec-socks-4.1.32.Final.jar -- lib/io.netty-netty-common-4.1.32.Final.jar -- lib/io.netty-netty-handler-4.1.32.Final.jar -- lib/io.netty-netty-handler-proxy-4.1.32.Final.jar -- lib/io.netty-netty-resolver-4.1.32.Final.jar -- lib/io.netty-netty-resolver-dns-4.1.32.Final.jar +- lib/io.netty-netty-buffer-4.1.50.Final.jar +- lib/io.netty-netty-codec-4.1.50.Final.jar +- lib/io.netty-netty-codec-dns-4.1.50.Final.jar +- lib/io.netty-netty-codec-http-4.1.50.Final.jar +- lib/io.netty-netty-codec-http2-4.1.50.Final.jar +- lib/io.netty-netty-codec-socks-4.1.50.Final.jar +- lib/io.netty-netty-common-4.1.50.Final.jar +- lib/io.netty-netty-handler-4.1.50.Final.jar +- lib/io.netty-netty-handler-proxy-4.1.50.Final.jar +- lib/io.netty-netty-resolver-4.1.50.Final.jar +- lib/io.netty-netty-resolver-dns-4.1.50.Final.jar - lib/io.netty-netty-tcnative-boringssl-static-2.0.20.Final.jar -- lib/io.netty-netty-transport-4.1.32.Final.jar -- lib/io.netty-netty-transport-native-epoll-4.1.32.Final-linux-x86_64.jar -- lib/io.netty-netty-transport-native-unix-common-4.1.32.Final.jar +- lib/io.netty-netty-transport-4.1.50.Final.jar +- lib/io.netty-netty-transport-native-epoll-4.1.50.Final-linux-x86_64.jar +- lib/io.netty-netty-transport-native-unix-common-4.1.50.Final.jar The Netty Project @@ -102,17 +102,17 @@ granted provided that the copyright notice appears in all copies. Copyright 2010 Cedric Beust cedric@beust.com ------------------------------------------------------------------------------------ -- lib/io.grpc-grpc-all-1.18.0.jar -- lib/io.grpc-grpc-auth-1.18.0.jar -- lib/io.grpc-grpc-context-1.18.0.jar -- lib/io.grpc-grpc-core-1.18.0.jar -- lib/io.grpc-grpc-netty-1.18.0.jar -- lib/io.grpc-grpc-okhttp-1.18.0.jar -- lib/io.grpc-grpc-protobuf-1.18.0.jar -- lib/io.grpc-grpc-protobuf-lite-1.18.0.jar -- lib/io.grpc-grpc-protobuf-nano-1.18.0.jar -- lib/io.grpc-grpc-stub-1.18.0.jar -- lib/io.grpc-grpc-testing-1.18.0.jar +- lib/io.grpc-grpc-all-1.33.0.jar +- lib/io.grpc-grpc-auth-1.33.0.jar +- lib/io.grpc-grpc-context-1.33.0.jar +- lib/io.grpc-grpc-core-1.33.0.jar +- lib/io.grpc-grpc-netty-1.33.0.jar +- lib/io.grpc-grpc-okhttp-1.33.0.jar +- lib/io.grpc-grpc-protobuf-1.33.0.jar +- lib/io.grpc-grpc-protobuf-lite-1.33.0.jar +- lib/io.grpc-grpc-protobuf-nano-1.33.0.jar +- lib/io.grpc-grpc-stub-1.33.0.jar +- lib/io.grpc-grpc-testing-1.33.0.jar Copyright 2014, gRPC Authors All rights reserved. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.aalto-xml.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.aalto-xml.txt new file mode 100644 index 00000000000..a94403f6e4a --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.aalto-xml.txt @@ -0,0 +1,13 @@ +This copy of Aalto XML processor is licensed under the +Apache (Software) License, version 2.0 ("the License"). +See the License for details about distribution rights, and the +specific rights regarding derivate works. + +You may obtain a copy of the License at: + +http://www.apache.org/licenses/ + +A copy is also included with both the the downloadable source code package +and jar that contains class bytecodes, as file "ASL 2.0". In both cases, +that file should be located next to this file: in source distribution +the location should be "release-notes/asl"; and in jar "META-INF/" \ No newline at end of file diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.base64.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.base64.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.base64.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.base64.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.bouncycastle.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.bouncycastle.txt new file mode 100644 index 00000000000..dbba1dd7829 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.bouncycastle.txt @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc. + (http://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.caliper.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.caliper.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.caliper.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-lang.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-lang.txt new file mode 100644 index 00000000000..66a27ec5ff9 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-lang.txt @@ -0,0 +1,177 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-logging.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-logging.txt new file mode 100644 index 00000000000..66a27ec5ff9 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.commons-logging.txt @@ -0,0 +1,177 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.compress-lzf.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.compress-lzf.txt new file mode 100644 index 00000000000..c5da4e13481 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.compress-lzf.txt @@ -0,0 +1,11 @@ +Copyright 2009-2010 Ning, Inc. + +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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.dnsinfo.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.dnsinfo.txt new file mode 100644 index 00000000000..7554838ad79 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.dnsinfo.txt @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2004-2006, 2008, 2009, 2011 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.harmony.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.harmony.txt new file mode 100644 index 00000000000..66a27ec5ff9 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.harmony.txt @@ -0,0 +1,177 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hpack.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hpack.txt new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hpack.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hyper-hpack.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hyper-hpack.txt new file mode 100644 index 00000000000..d24c351e188 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.hyper-hpack.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Cory Benfield + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jboss-marshalling.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jboss-marshalling.txt new file mode 100644 index 00000000000..e454a52586f --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jboss-marshalling.txt @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jbzip2.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jbzip2.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jbzip2.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jbzip2.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jctools.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jctools.txt new file mode 100644 index 00000000000..66a27ec5ff9 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jctools.txt @@ -0,0 +1,177 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jfastlz.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jfastlz.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jfastlz.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jfastlz.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jsr166y.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jsr166y.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.jsr166y.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jsr166y.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jzlib.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jzlib.txt new file mode 100644 index 00000000000..29ad562af0a --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.jzlib.txt @@ -0,0 +1,26 @@ +Copyright (c) 2000,2001,2002,2003,2004 ymnk, JCraft,Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + 3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, +INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.libdivsufsort.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.libdivsufsort.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.libdivsufsort.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.libdivsufsort.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.log4j.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.log4j.txt new file mode 100644 index 00000000000..66a27ec5ff9 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.log4j.txt @@ -0,0 +1,177 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lz4.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lz4.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lz4.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lzma-java.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lzma-java.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.lzma-java.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.mvn-wrapper.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.mvn-wrapper.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.mvn-wrapper.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.nghttp2-hpack.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.nghttp2-hpack.txt new file mode 100644 index 00000000000..80201792ec7 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.nghttp2-hpack.txt @@ -0,0 +1,23 @@ +The MIT License + +Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa +Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.protobuf.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.protobuf.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.protobuf.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.protobuf.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.slf4j.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.slf4j.txt similarity index 100% rename from bookkeeper-dist/src/main/resources/deps/netty-4.1.32.Final/LICENSE.slf4j.txt rename to bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.slf4j.txt diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.snappy.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.snappy.txt new file mode 100644 index 00000000000..ba6a3ae553a --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.snappy.txt @@ -0,0 +1,28 @@ +Copyright 2011, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. +* Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.webbit.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.webbit.txt new file mode 100644 index 00000000000..05ae225fa31 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/LICENSE.webbit.txt @@ -0,0 +1,37 @@ +(BSD License: http://www.opensource.org/licenses/bsd-license) + +Copyright (c) 2011, Joe Walnes, Aslak Hellesøy and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of the Webbit nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/NOTICE.harmony.txt b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/NOTICE.harmony.txt new file mode 100644 index 00000000000..036ba0d4bb2 --- /dev/null +++ b/bookkeeper-dist/src/main/resources/deps/netty-4.1.50.Final/NOTICE.harmony.txt @@ -0,0 +1,6 @@ +Apache Harmony + +Copyright 2006, 2010 The Apache Software Foundation. + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/metadata-drivers/etcd/pom.xml b/metadata-drivers/etcd/pom.xml index 5e72cbf98cc..1a4882ead7a 100644 --- a/metadata-drivers/etcd/pom.xml +++ b/metadata-drivers/etcd/pom.xml @@ -32,8 +32,9 @@ bookkeeper-server ${project.version} + - com.coreos + io.etcd jetcd-core ${etcd.version} @@ -43,9 +44,36 @@ + io.grpc grpc-all + ${grpc.version} + + + + org.arquillian.cube + arquillian-cube-docker + ${arquillian-cube.version} + + + com.github.docker-java + * + + + test + + + org.jboss.arquillian.junit + arquillian-junit-standalone + ${arquillian-junit.version} + + + com.github.docker-java + * + + + test org.testcontainers diff --git a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdClientUtils.java b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdClientUtils.java similarity index 96% rename from metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdClientUtils.java rename to metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdClientUtils.java index 0c414218c16..f696e19cc3f 100644 --- a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdClientUtils.java +++ b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdClientUtils.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package com.coreos.jetcd.internal.impl; +package io.etcd.jetcd; import java.lang.reflect.Field; diff --git a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdConnectionManager.java b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdConnectionManager.java similarity index 94% rename from metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdConnectionManager.java rename to metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdConnectionManager.java index 6428f5c96ad..52b5199f430 100644 --- a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/EtcdConnectionManager.java +++ b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/EtcdConnectionManager.java @@ -16,10 +16,9 @@ * limitations under the License. */ -package com.coreos.jetcd.internal.impl; +package io.etcd.jetcd; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.api.WatchGrpc; +import io.etcd.jetcd.api.WatchGrpc; import lombok.extern.slf4j.Slf4j; /** diff --git a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/package-info.java b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/package-info.java similarity index 95% rename from metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/package-info.java rename to metadata-drivers/etcd/src/main/java/io/etcd/jetcd/package-info.java index 44d9109b3c9..77ce69ff430 100644 --- a/metadata-drivers/etcd/src/main/java/com/coreos/jetcd/internal/impl/package-info.java +++ b/metadata-drivers/etcd/src/main/java/io/etcd/jetcd/package-info.java @@ -19,4 +19,4 @@ /** * Etcd client changes for bookkeeper metadata driver. */ -package com.coreos.jetcd.internal.impl; \ No newline at end of file +package io.etcd.jetcd; \ No newline at end of file diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGenerator.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGenerator.java index f21cb811b09..6765ba2d9f1 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGenerator.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGenerator.java @@ -21,16 +21,18 @@ import static com.google.common.base.Preconditions.checkArgument; import static org.apache.bookkeeper.metadata.etcd.EtcdConstants.EMPTY_BS; -import com.coreos.jetcd.KV; -import com.coreos.jetcd.Txn; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.data.KeyValue; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.op.Cmp; -import com.coreos.jetcd.op.Cmp.Op; -import com.coreos.jetcd.op.CmpTarget; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.PutOption; +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.KV; +import io.etcd.jetcd.KeyValue; +import io.etcd.jetcd.Txn; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.op.Cmp; +import io.etcd.jetcd.op.Cmp.Op; +import io.etcd.jetcd.op.CmpTarget; +import io.etcd.jetcd.options.GetOption; +import io.etcd.jetcd.options.PutOption; + +import java.nio.charset.StandardCharsets; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; import lombok.extern.slf4j.Slf4j; @@ -94,16 +96,16 @@ public void generateLedgerId(GenericCallback cb) { checkArgument(bucketId >= 0 && bucketId < NUM_BUCKETS, "Invalid bucket id : " + bucketId); - ByteSequence bucketKey = ByteSequence.fromString(EtcdUtils.getBucketPath(scope, bucketId)); + ByteSequence bucketKey = ByteSequence.from(EtcdUtils.getBucketPath(scope, bucketId), StandardCharsets.UTF_8); Txn txn = kvClient.txn() .If(new Cmp(bucketKey, Op.GREATER, CmpTarget.createRevision(0))) .Then( - com.coreos.jetcd.op.Op.put(bucketKey, EMPTY_BS, PutOption.DEFAULT), - com.coreos.jetcd.op.Op.get(bucketKey, GetOption.DEFAULT) + io.etcd.jetcd.op.Op.put(bucketKey, EMPTY_BS, PutOption.DEFAULT), + io.etcd.jetcd.op.Op.get(bucketKey, GetOption.DEFAULT) ) .Else( - com.coreos.jetcd.op.Op.put(bucketKey, EMPTY_BS, PutOption.DEFAULT), - com.coreos.jetcd.op.Op.get(bucketKey, GetOption.DEFAULT) + io.etcd.jetcd.op.Op.put(bucketKey, EMPTY_BS, PutOption.DEFAULT), + io.etcd.jetcd.op.Op.get(bucketKey, GetOption.DEFAULT) ); txn.commit() .thenAccept(txnResponse -> { @@ -114,7 +116,7 @@ public void generateLedgerId(GenericCallback cb) { if (resp.getCount() > 0) { KeyValue kv = resp.getKvs().get(0); if (kv.getVersion() > MAX_ID_PER_BUCKET) { - log.warn("Etcd bucket '{}' is overflowed", bucketKey.toStringUtf8()); + log.warn("Etcd bucket '{}' is overflowed", bucketKey.toString(StandardCharsets.UTF_8)); // the bucket is overflowed, moved to next bucket. generateLedgerId(cb); } else { diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdBookieRegister.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdBookieRegister.java index 9c16ef0c7ee..e345f67f315 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdBookieRegister.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdBookieRegister.java @@ -20,11 +20,14 @@ import static org.apache.bookkeeper.metadata.etcd.EtcdUtils.msResult; -import com.coreos.jetcd.Lease; -import com.coreos.jetcd.Lease.KeepAliveListener; -import com.coreos.jetcd.common.exception.EtcdException; -import com.coreos.jetcd.lease.LeaseKeepAliveResponse; import com.google.common.util.concurrent.ThreadFactoryBuilder; + +import io.etcd.jetcd.Lease; +import io.etcd.jetcd.lease.LeaseKeepAliveResponse; +import io.etcd.jetcd.support.CloseableClient; + +import io.grpc.stub.StreamObserver; + import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; @@ -33,6 +36,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Supplier; + import lombok.AccessLevel; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -51,9 +55,11 @@ class EtcdBookieRegister implements AutoCloseable, Runnable, Supplier { private final ScheduledExecutorService executor; private final RegistrationListener regListener; private volatile CompletableFuture leaseFuture = new CompletableFuture<>(); + private volatile CompletableFuture keepAliveFuture = new CompletableFuture<>(); + @Getter(AccessLevel.PACKAGE) private volatile long leaseId = -0xabcd; - private volatile KeepAliveListener kaListener = null; + private volatile CloseableClient kaListener = null; private volatile boolean running = true; private long nextWaitTimeMs = 200; private Future runFuture = null; @@ -88,7 +94,33 @@ private void newLeaseIfNeeded() throws MetadataStoreException { } if (newLeaseNeeded) { long leaseId = msResult(leaseClient.grant(ttlSeconds)).getID(); - this.kaListener = leaseClient.keepAlive(leaseId); + keepAliveFuture = new CompletableFuture<>(); + if (kaListener != null) { + synchronized (this) { + kaListener.close(); + kaListener = null; + } + } + this.kaListener = leaseClient.keepAlive(leaseId, new StreamObserver() { + @Override + public void onNext(LeaseKeepAliveResponse response) { + log.info("KeepAlive response : lease = {}, ttl = {}", + response.getID(), response.getTTL()); + } + + @Override + public void onError(Throwable t) { + log.info("KeepAlive renewal failed, leaseId {}", leaseId, t.fillInStackTrace()); + keepAliveFuture.completeExceptionally(t); + } + + @Override + public void onCompleted() { + log.info("{} lease completed! leaseId {}", leaseId); + keepAliveFuture.cancel(true); + } + }); + this.leaseId = leaseId; leaseFuture.complete(leaseId); log.info("New lease '{}' is granted.", leaseId); @@ -101,14 +133,14 @@ private void waitForNewLeaseId() { newLeaseIfNeeded(); nextWaitTimeMs = 100L; } catch (MetadataStoreException e) { - log.error("Failed to grant a new lease", e); + log.error("Failed to grant a new lease for leaseId", leaseId, e); try { TimeUnit.MILLISECONDS.sleep(nextWaitTimeMs); nextWaitTimeMs *= 2; nextWaitTimeMs = Math.min(nextWaitTimeMs, TimeUnit.SECONDS.toMillis(ttlSeconds)); } catch (InterruptedException e1) { Thread.currentThread().interrupt(); - log.warn("Interrupted at backing off granting a new lease"); + log.warn("Interrupted at backing off granting a new lease for leaseId {}", leaseId); } continue; } @@ -122,15 +154,13 @@ public void run() { // here we get a lease, keep it alive try { log.info("Keeping Alive at lease = {}", get()); - LeaseKeepAliveResponse kaResponse = kaListener.listen(); - log.info("KeepAlive response : lease = {}, ttl = {}", - kaResponse.getID(), kaResponse.getTTL()); + keepAliveFuture.get(); continue; } catch (InterruptedException ie) { Thread.currentThread().interrupt(); log.warn("Interrupted at keeping lease '{}' alive", leaseId); resetLease(); - } catch (EtcdException ee) { + } catch (ExecutionException ee) { log.warn("Failed to keep alive lease '{}'", leaseId, ee); resetLease(); } @@ -141,7 +171,6 @@ private void resetLease() { synchronized (this) { leaseFuture = new CompletableFuture<>(); } - kaListener.close(); if (null != regListener) { regListener.onRegistrationExpired(); } @@ -160,6 +189,11 @@ public void close() { log.info("Successfully interrupted bookie register."); } } + keepAliveFuture.cancel(true); + if (kaListener != null) { + kaListener.close(); + kaListener = null; + } } CompletableFuture closeFuture = new CompletableFuture<>(); executor.submit(() -> { diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdConstants.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdConstants.java index fed70b51e4c..47558c7466c 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdConstants.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdConstants.java @@ -17,7 +17,7 @@ */ package org.apache.bookkeeper.metadata.etcd; -import com.coreos.jetcd.data.ByteSequence; +import io.etcd.jetcd.ByteSequence; /** * Constants used in the Etcd metadata drivers. @@ -48,6 +48,6 @@ private EtcdConstants() {} public static final String UR_NODE = "underreplication"; - public static final ByteSequence EMPTY_BS = ByteSequence.fromBytes(new byte[0]); + public static final ByteSequence EMPTY_BS = ByteSequence.from(new byte[0]); } diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLayoutManager.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLayoutManager.java index a20886d4d93..00a322e05ba 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLayoutManager.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLayoutManager.java @@ -20,18 +20,20 @@ import static org.apache.bookkeeper.metadata.etcd.EtcdUtils.ioResult; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.KV; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.kv.DeleteResponse; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.kv.TxnResponse; -import com.coreos.jetcd.op.Cmp; -import com.coreos.jetcd.op.Cmp.Op; -import com.coreos.jetcd.op.CmpTarget; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.PutOption; +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.KV; +import io.etcd.jetcd.kv.DeleteResponse; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.kv.TxnResponse; +import io.etcd.jetcd.op.Cmp; +import io.etcd.jetcd.op.CmpTarget; +import io.etcd.jetcd.options.GetOption; +import io.etcd.jetcd.options.PutOption; + import java.io.IOException; +import java.nio.charset.StandardCharsets; + import lombok.AccessLevel; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -54,7 +56,7 @@ class EtcdLayoutManager implements LayoutManager { this.client = client; this.kvClient = client.getKVClient(); this.scope = scope; - this.layoutKey = ByteSequence.fromString(EtcdUtils.getLayoutKey(scope)); + this.layoutKey = ByteSequence.from(EtcdUtils.getLayoutKey(scope), StandardCharsets.UTF_8); } @Override @@ -70,11 +72,11 @@ public LedgerLayout readLedgerLayout() throws IOException { @Override public void storeLedgerLayout(LedgerLayout layout) throws IOException { - ByteSequence layoutData = ByteSequence.fromBytes(layout.serialize()); + ByteSequence layoutData = ByteSequence.from(layout.serialize()); TxnResponse response = ioResult(kvClient.txn() - .If(new Cmp(layoutKey, Op.GREATER, CmpTarget.createRevision(0))) - .Then(com.coreos.jetcd.op.Op.get(layoutKey, GetOption.DEFAULT)) - .Else(com.coreos.jetcd.op.Op.put(layoutKey, layoutData, PutOption.DEFAULT)) + .If(new Cmp(layoutKey, Cmp.Op.GREATER, CmpTarget.createRevision(0))) + .Then(io.etcd.jetcd.op.Op.get(layoutKey, GetOption.DEFAULT)) + .Else(io.etcd.jetcd.op.Op.put(layoutKey, layoutData, PutOption.DEFAULT)) .commit()); // key doesn't exist and we created the key if (!response.isSucceeded()) { @@ -84,11 +86,11 @@ public void storeLedgerLayout(LedgerLayout layout) throws IOException { GetResponse resp = response.getGetResponses().get(0); if (resp.getCount() <= 0) { // fail to put key/value but key is not found - throw new IOException("Creating layout node '" + layoutKey.toStringUtf8() + throw new IOException("Creating layout node '" + layoutKey.toString(StandardCharsets.UTF_8) + "' failed due to it already exists but no layout node is found"); } else { throw new LedgerLayoutExistsException( - "Ledger layout already exists under '" + layoutKey.toStringUtf8() + "'"); + "Ledger layout already exists under '" + layoutKey.toString(StandardCharsets.UTF_8) + "'"); } } } @@ -98,11 +100,12 @@ public void deleteLedgerLayout() throws IOException { DeleteResponse response = ioResult(kvClient.delete(layoutKey)); if (response.getDeleted() > 0) { if (log.isDebugEnabled()) { - log.debug("Successfully delete layout '{}'", layoutKey.toStringUtf8()); + log.debug("Successfully delete layout '{}'", layoutKey.toString(StandardCharsets.UTF_8)); } return; } else { - throw new IOException("No ledger layout is found under '" + layoutKey.toStringUtf8() + "'"); + throw new IOException("No ledger layout is found under '" + layoutKey.toString(StandardCharsets.UTF_8) + + "'"); } } } diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManager.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManager.java index 676b6cc34a9..94f06cbafef 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManager.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManager.java @@ -18,21 +18,23 @@ */ package org.apache.bookkeeper.metadata.etcd; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.KV; -import com.coreos.jetcd.Txn; -import com.coreos.jetcd.common.exception.ClosedClientException; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.data.KeyValue; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.op.Cmp; -import com.coreos.jetcd.op.Cmp.Op; -import com.coreos.jetcd.op.CmpTarget; -import com.coreos.jetcd.options.DeleteOption; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.PutOption; import com.google.common.collect.Sets; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.KV; +import io.etcd.jetcd.KeyValue; +import io.etcd.jetcd.Txn; +import io.etcd.jetcd.common.exception.ClosedClientException; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.op.Cmp; +import io.etcd.jetcd.op.CmpTarget; +import io.etcd.jetcd.options.DeleteOption; +import io.etcd.jetcd.options.GetOption; +import io.etcd.jetcd.options.PutOption; + import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Optional; import java.util.Set; @@ -41,6 +43,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.function.Consumer; + import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.client.BKException; import org.apache.bookkeeper.client.api.LedgerMetadata; @@ -99,10 +102,10 @@ public CompletableFuture> createLedgerMetadata(long le String ledgerKey = EtcdUtils.getLedgerKey(scope, ledgerId); log.info("Create ledger metadata under key {}", ledgerKey); - ByteSequence ledgerKeyBs = ByteSequence.fromString(ledgerKey); + ByteSequence ledgerKeyBs = ByteSequence.from(ledgerKey, StandardCharsets.UTF_8); final ByteSequence valueBs; try { - valueBs = ByteSequence.fromBytes(serDe.serialize(metadata)); + valueBs = ByteSequence.from(serDe.serialize(metadata)); } catch (IOException ioe) { promise.completeExceptionally(new BKException.BKMetadataSerializationException(ioe)); return promise; @@ -110,14 +113,14 @@ public CompletableFuture> createLedgerMetadata(long le kvClient.txn() .If(new Cmp( ledgerKeyBs, - Op.GREATER, + Cmp.Op.GREATER, CmpTarget.createRevision(0L))) - .Then(com.coreos.jetcd.op.Op.get( + .Then(io.etcd.jetcd.op.Op.get( ledgerKeyBs, GetOption.newBuilder() .withCountOnly(true) .build())) - .Else(com.coreos.jetcd.op.Op.put( + .Else(io.etcd.jetcd.op.Op.put( ledgerKeyBs, valueBs, PutOption.DEFAULT)) @@ -163,27 +166,27 @@ public CompletableFuture removeLedgerMetadata(long ledgerId, Version versi } String ledgerKey = EtcdUtils.getLedgerKey(scope, ledgerId); - ByteSequence ledgerKeyBs = ByteSequence.fromString(ledgerKey); + ByteSequence ledgerKeyBs = ByteSequence.from(ledgerKey, StandardCharsets.UTF_8); Txn txn = kvClient.txn(); if (revision == -0xabcd) { txn = txn.If(new Cmp( ledgerKeyBs, - Op.GREATER, + Cmp.Op.GREATER, CmpTarget.createRevision(0L) )); } else { txn = txn.If(new Cmp( ledgerKeyBs, - Op.EQUAL, + Cmp.Op.EQUAL, CmpTarget.modRevision(revision) )); } txn - .Then(com.coreos.jetcd.op.Op.delete( + .Then(io.etcd.jetcd.op.Op.delete( ledgerKeyBs, DeleteOption.DEFAULT )) - .Else(com.coreos.jetcd.op.Op.get( + .Else(io.etcd.jetcd.op.Op.get( ledgerKeyBs, GetOption.DEFAULT )) @@ -213,7 +216,7 @@ public CompletableFuture removeLedgerMetadata(long ledgerId, Version versi public CompletableFuture> readLedgerMetadata(long ledgerId) { CompletableFuture> promise = new CompletableFuture<>(); String ledgerKey = EtcdUtils.getLedgerKey(scope, ledgerId); - ByteSequence ledgerKeyBs = ByteSequence.fromString(ledgerKey); + ByteSequence ledgerKeyBs = ByteSequence.from(ledgerKey, StandardCharsets.UTF_8); log.info("read ledger metadata under key {}", ledgerKey); kvClient.get(ledgerKeyBs) .thenAccept(getResp -> { @@ -249,11 +252,11 @@ public CompletableFuture> writeLedgerMetadata(long led } final LongVersion lv = (LongVersion) currentVersion; String ledgerKey = EtcdUtils.getLedgerKey(scope, ledgerId); - ByteSequence ledgerKeyBs = ByteSequence.fromString(ledgerKey); + ByteSequence ledgerKeyBs = ByteSequence.from(ledgerKey, StandardCharsets.UTF_8); final ByteSequence valueBs; try { - valueBs = ByteSequence.fromBytes(serDe.serialize(metadata)); + valueBs = ByteSequence.from(serDe.serialize(metadata)); } catch (IOException ioe) { promise.completeExceptionally(new BKException.BKMetadataSerializationException(ioe)); return promise; @@ -262,13 +265,13 @@ public CompletableFuture> writeLedgerMetadata(long led kvClient.txn() .If(new Cmp( ledgerKeyBs, - Op.EQUAL, + Cmp.Op.EQUAL, CmpTarget.modRevision(lv.getLongVersion()))) - .Then(com.coreos.jetcd.op.Op.put( + .Then(io.etcd.jetcd.op.Op.put( ledgerKeyBs, valueBs, PutOption.DEFAULT)) - .Else(com.coreos.jetcd.op.Op.get( + .Else(io.etcd.jetcd.op.Op.get( ledgerKeyBs, GetOption.DEFAULT)) .commit() @@ -322,12 +325,14 @@ public void registerLedgerMetadataListener(long ledgerId, LedgerMetadataListener Optional.empty() ); } catch (IOException ioe) { - log.error("Could not parse ledger metadata : {}", bs.toStringUtf8(), ioe); + log.error("Could not parse ledger metadata : {}", + bs.toString(StandardCharsets.UTF_8), ioe); throw new RuntimeException( - "Could not parse ledger metadata : " + bs.toStringUtf8(), ioe); + "Could not parse ledger metadata : " + + bs.toString(StandardCharsets.UTF_8), ioe); } }, - ByteSequence.fromString(EtcdUtils.getLedgerKey(scope, ledgerId))) + ByteSequence.from(EtcdUtils.getLedgerKey(scope, ledgerId), StandardCharsets.UTF_8)) ); LedgerMetadataConsumer lmConsumer = listenerToConsumer(ledgerId, listener, (lid) -> { @@ -387,10 +392,10 @@ public void asyncProcessLedgers(Processor processor, int failureRc) { KeyStream ks = new KeyStream<>( kvClient, - ByteSequence.fromString(EtcdUtils.getLedgerKey(scope, 0L)), - ByteSequence.fromString(EtcdUtils.getLedgerKey(scope, Long.MAX_VALUE)), + ByteSequence.from(EtcdUtils.getLedgerKey(scope, 0L), StandardCharsets.UTF_8), + ByteSequence.from(EtcdUtils.getLedgerKey(scope, Long.MAX_VALUE), StandardCharsets.UTF_8), bs -> { - UUID uuid = EtcdUtils.parseLedgerKey(bs.toStringUtf8()); + UUID uuid = EtcdUtils.parseLedgerKey(bs.toString(StandardCharsets.UTF_8)); return uuid.getLeastSignificantBits(); } ); @@ -422,10 +427,10 @@ private void processLedgers(KeyStream ks, public LedgerRangeIterator getLedgerRanges(long opTimeOutMs) { KeyStream ks = new KeyStream<>( kvClient, - ByteSequence.fromString(EtcdUtils.getLedgerKey(scope, 0L)), - ByteSequence.fromString(EtcdUtils.getLedgerKey(scope, Long.MAX_VALUE)), + ByteSequence.from(EtcdUtils.getLedgerKey(scope, 0L), StandardCharsets.UTF_8), + ByteSequence.from(EtcdUtils.getLedgerKey(scope, Long.MAX_VALUE), StandardCharsets.UTF_8), bs -> { - UUID uuid = EtcdUtils.parseLedgerKey(bs.toStringUtf8()); + UUID uuid = EtcdUtils.parseLedgerKey(bs.toString(StandardCharsets.UTF_8)); return uuid.getLeastSignificantBits(); } ); diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManagerFactory.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManagerFactory.java index dc7d1517b2b..3f103e468b4 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManagerFactory.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdLedgerManagerFactory.java @@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument; -import com.coreos.jetcd.Client; +import io.etcd.jetcd.Client; import java.io.IOException; import org.apache.bookkeeper.common.net.ServiceURI; import org.apache.bookkeeper.conf.AbstractConfiguration; diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdMetadataDriverBase.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdMetadataDriverBase.java index 47b034c00ef..dec40ad74ac 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdMetadataDriverBase.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdMetadataDriverBase.java @@ -18,7 +18,7 @@ package org.apache.bookkeeper.metadata.etcd; import com.beust.jcommander.internal.Lists; -import com.coreos.jetcd.Client; +import io.etcd.jetcd.Client; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationClient.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationClient.java index 77ecb6ea00d..15fff31904a 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationClient.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationClient.java @@ -18,9 +18,12 @@ */ package org.apache.bookkeeper.metadata.etcd; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.data.ByteSequence; import com.google.common.collect.Maps; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; + +import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -42,7 +45,7 @@ class EtcdRegistrationClient implements RegistrationClient { private static Function newBookieSocketAddressFunc(String prefix) { return bs -> { - String addrStr = bs.toStringUtf8(); + String addrStr = bs.toString(StandardCharsets.UTF_8); return BookieId.parse(addrStr.replace(prefix, "")); }; } @@ -62,15 +65,15 @@ private static Function newBookieSocketAddressFunc(Strin client, watchClient, newBookieSocketAddressFunc(EtcdUtils.getWritableBookiesBeginPath(scope)), - ByteSequence.fromString(EtcdUtils.getWritableBookiesBeginPath(scope)), - ByteSequence.fromString(EtcdUtils.getWritableBookiesEndPath(scope)) + ByteSequence.from(EtcdUtils.getWritableBookiesBeginPath(scope), StandardCharsets.UTF_8), + ByteSequence.from(EtcdUtils.getWritableBookiesEndPath(scope), StandardCharsets.UTF_8) ); this.readonlyBookiesReader = new KeySetReader<>( client, watchClient, newBookieSocketAddressFunc(EtcdUtils.getReadonlyBookiesBeginPath(scope)), - ByteSequence.fromString(EtcdUtils.getReadonlyBookiesBeginPath(scope)), - ByteSequence.fromString(EtcdUtils.getReadonlyBookiesEndPath(scope)) + ByteSequence.from(EtcdUtils.getReadonlyBookiesBeginPath(scope), StandardCharsets.UTF_8), + ByteSequence.from(EtcdUtils.getReadonlyBookiesEndPath(scope), StandardCharsets.UTF_8) ); } diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationManager.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationManager.java index 27b5a4d09f7..55f11214d11 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationManager.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationManager.java @@ -35,28 +35,29 @@ import static org.apache.bookkeeper.metadata.etcd.EtcdUtils.getWritableBookiesPath; import static org.apache.bookkeeper.metadata.etcd.EtcdUtils.msResult; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.KV; -import com.coreos.jetcd.Txn; -import com.coreos.jetcd.Watch; -import com.coreos.jetcd.Watch.Watcher; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.data.KeyValue; -import com.coreos.jetcd.kv.DeleteResponse; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.kv.TxnResponse; -import com.coreos.jetcd.op.Cmp; -import com.coreos.jetcd.op.Cmp.Op; -import com.coreos.jetcd.op.CmpTarget; -import com.coreos.jetcd.options.DeleteOption; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.PutOption; -import com.coreos.jetcd.options.WatchOption; -import com.coreos.jetcd.watch.WatchEvent; -import com.coreos.jetcd.watch.WatchEvent.EventType; -import com.coreos.jetcd.watch.WatchResponse; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.UncheckedExecutionException; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.KV; +import io.etcd.jetcd.KeyValue; +import io.etcd.jetcd.Txn; +import io.etcd.jetcd.Watch; +import io.etcd.jetcd.Watch.Watcher; +import io.etcd.jetcd.kv.DeleteResponse; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.kv.TxnResponse; +import io.etcd.jetcd.op.Cmp; +import io.etcd.jetcd.op.Cmp.Op; +import io.etcd.jetcd.op.CmpTarget; +import io.etcd.jetcd.options.DeleteOption; +import io.etcd.jetcd.options.GetOption; +import io.etcd.jetcd.options.PutOption; +import io.etcd.jetcd.options.WatchOption; +import io.etcd.jetcd.watch.WatchEvent; +import io.etcd.jetcd.watch.WatchEvent.EventType; + import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -158,7 +159,7 @@ public void registerBookie(BookieId bookieId, boolean readOnly, private boolean checkRegNodeAndWaitExpired(String regPath, long leaseId) throws MetadataStoreException { - ByteSequence regPathBs = ByteSequence.fromString(regPath); + ByteSequence regPathBs = ByteSequence.from(regPath, UTF_8); GetResponse getResp = msResult(kvClient.get(regPathBs)); if (getResp.getCount() <= 0) { // key doesn't exist anymore @@ -170,7 +171,7 @@ private boolean checkRegNodeAndWaitExpired(String regPath, long leaseId) private boolean waitUntilRegNodeExpired(String regPath, long leaseId) throws MetadataStoreException { - ByteSequence regPathBs = ByteSequence.fromString(regPath); + ByteSequence regPathBs = ByteSequence.from(regPath, UTF_8); // check regPath again GetResponse getResp = msResult(kvClient.get(regPathBs)); if (getResp.getCount() <= 0) { @@ -180,34 +181,33 @@ private boolean waitUntilRegNodeExpired(String regPath, long leaseId) KeyValue kv = getResp.getKvs().get(0); if (kv.getLease() != leaseId) { Watch watchClient = client.getWatchClient(); + final CompletableFuture watchFuture = new CompletableFuture<>(); Watcher watcher = watchClient.watch( regPathBs, WatchOption.newBuilder() .withRevision(getResp.getHeader().getRevision() + 1) - .build()); - log.info("Previous bookie registration (lease = {}) still exists at {}, " - + "so new lease '{}' will be waiting previous lease for {} seconds to be expired", - kv.getLease(), regPath, leaseId, bkRegister.getTtlSeconds()); - CompletableFuture watchFuture = - CompletableFuture.runAsync(() -> { - try { - while (true) { - log.info("Listening on '{}' until it is expired", regPath); - WatchResponse response = watcher.listen(); - for (WatchEvent event : response.getEvents()) { - log.info("Received watch event on '{}' : EventType = {}", - regPath, event.getEventType()); - if (EventType.DELETE == event.getEventType()) { - return; - } - } + .build(), + response -> { + for (WatchEvent event : response.getEvents()) { + log.info("Received watch event on '{}' : EventType = {}, lease {}", + regPath, event.getEventType(), leaseId); + if (EventType.DELETE == event.getEventType()) { + watchFuture.complete(null); + return; } - } catch (InterruptedException e) { - throw new UncheckedExecutionException( - "Interrupted at waiting previous registration under " - + regPath + " (lease = " + kv.getLease() + ") to be expired", e); } - }); + }, + exception -> { + log.warn("Exception in keepAlive for watch event on {}, lease {}", + regPath, leaseId, exception); + watchFuture.completeExceptionally(new UncheckedExecutionException( + "Interrupted at waiting previous registration under " + + regPath + " (lease = " + kv.getLease() + ") to be expired", exception)); + } + ); + log.info("Previous bookie registration (lease = {}) still exists at {}, " + + "so new lease '{}' will be waiting previous lease for {} seconds to be expired", + kv.getLease(), regPath, leaseId, bkRegister.getTtlSeconds()); try { msResult(watchFuture, 2 * bkRegister.getTtlSeconds(), TimeUnit.SECONDS); @@ -236,16 +236,16 @@ private void doRegisterBookie(String regPath, long leaseId) throws MetadataStore return; } - ByteSequence regPathBs = ByteSequence.fromString(regPath); + ByteSequence regPathBs = ByteSequence.from(regPath, UTF_8); Txn txn = kvClient.txn() .If(new Cmp( regPathBs, Op.GREATER, CmpTarget.createRevision(0))) - .Then(com.coreos.jetcd.op.Op.get(regPathBs, GetOption.DEFAULT)) - .Else(com.coreos.jetcd.op.Op.put( + .Then(io.etcd.jetcd.op.Op.get(regPathBs, GetOption.DEFAULT)) + .Else(io.etcd.jetcd.op.Op.put( regPathBs, - ByteSequence.fromBytes(new byte[0]), + ByteSequence.from(new byte[0]), PutOption.newBuilder() .withLeaseId(bkRegister.get()) .build() @@ -272,7 +272,7 @@ private void doRegisterReadonlyBookie(BookieId bookieId, long leaseId) throws Me String readonlyRegPath = getReadonlyBookiePath(scope, bookieId); doRegisterBookie(readonlyRegPath, leaseId); String writableRegPath = getWritableBookiePath(scope, bookieId); - msResult(kvClient.delete(ByteSequence.fromString(writableRegPath))); + msResult(kvClient.delete(ByteSequence.from(writableRegPath, UTF_8))); } @Override @@ -283,7 +283,7 @@ public void unregisterBookie(BookieId bookieId, boolean readOnly) throws BookieE } else { regPath = getWritableBookiePath(scope, bookieId); } - DeleteResponse delResp = msResult(kvClient.delete(ByteSequence.fromString(regPath))); + DeleteResponse delResp = msResult(kvClient.delete(ByteSequence.from(regPath, UTF_8))); if (delResp.getDeleted() > 0) { log.info("Successfully unregistered bookie {} from {}", bookieId, regPath); } else { @@ -294,12 +294,12 @@ public void unregisterBookie(BookieId bookieId, boolean readOnly) throws BookieE @Override public boolean isBookieRegistered(BookieId bookieId) throws BookieException { CompletableFuture getWritableFuture = kvClient.get( - ByteSequence.fromString(getWritableBookiePath(scope, bookieId)), + ByteSequence.from(getWritableBookiePath(scope, bookieId), UTF_8), GetOption.newBuilder() .withCountOnly(true) .build()); CompletableFuture getReadonlyFuture = kvClient.get( - ByteSequence.fromString(getReadonlyBookiePath(scope, bookieId)), + ByteSequence.from(getReadonlyBookiePath(scope, bookieId), UTF_8), GetOption.newBuilder() .withCountOnly(true) .build()); @@ -310,7 +310,7 @@ public boolean isBookieRegistered(BookieId bookieId) throws BookieException { @Override public void writeCookie(BookieId bookieId, Versioned cookieData) throws BookieException { - ByteSequence cookiePath = ByteSequence.fromString(getCookiePath(scope, bookieId)); + ByteSequence cookiePath = ByteSequence.from(getCookiePath(scope, bookieId), UTF_8); Txn txn = kvClient.txn(); if (Version.NEW == cookieData.getVersion()) { txn.If(new Cmp( @@ -319,9 +319,9 @@ public void writeCookie(BookieId bookieId, Versioned cookieData) throws CmpTarget.createRevision(0L)) ) // if key not exists, create one. - .Else(com.coreos.jetcd.op.Op.put( + .Else(io.etcd.jetcd.op.Op.put( cookiePath, - ByteSequence.fromBytes(cookieData.getValue()), + ByteSequence.from(cookieData.getValue()), PutOption.DEFAULT) ); } else { @@ -333,9 +333,9 @@ public void writeCookie(BookieId bookieId, Versioned cookieData) throws Op.EQUAL, CmpTarget.modRevision(((LongVersion) cookieData.getVersion()).getLongVersion())) ) - .Then(com.coreos.jetcd.op.Op.put( + .Then(io.etcd.jetcd.op.Op.put( cookiePath, - ByteSequence.fromBytes(cookieData.getValue()), + ByteSequence.from(cookieData.getValue()), PutOption.DEFAULT) ); } @@ -348,7 +348,7 @@ public void writeCookie(BookieId bookieId, Versioned cookieData) throws @Override public Versioned readCookie(BookieId bookieId) throws BookieException { - ByteSequence cookiePath = ByteSequence.fromString(getCookiePath(scope, bookieId)); + ByteSequence cookiePath = ByteSequence.from(getCookiePath(scope, bookieId), UTF_8); GetResponse resp = msResult(kvClient.get(cookiePath)); if (resp.getCount() <= 0) { throw new CookieNotFoundException(bookieId.toString()); @@ -362,18 +362,18 @@ public Versioned readCookie(BookieId bookieId) throws BookieException { @Override public void removeCookie(BookieId bookieId, Version version) throws BookieException { - ByteSequence cookiePath = ByteSequence.fromString(getCookiePath(scope, bookieId)); + ByteSequence cookiePath = ByteSequence.from(getCookiePath(scope, bookieId), UTF_8); Txn delTxn = kvClient.txn() .If(new Cmp( cookiePath, Op.EQUAL, CmpTarget.modRevision(((LongVersion) version).getLongVersion()) )) - .Then(com.coreos.jetcd.op.Op.delete( + .Then(io.etcd.jetcd.op.Op.delete( cookiePath, DeleteOption.DEFAULT )) - .Else(com.coreos.jetcd.op.Op.get( + .Else(io.etcd.jetcd.op.Op.get( cookiePath, GetOption.newBuilder().withCountOnly(true).build() )); @@ -382,21 +382,21 @@ public void removeCookie(BookieId bookieId, Version version) throws BookieExcept GetResponse getResp = txnResp.getGetResponses().get(0); if (getResp.getCount() > 0) { throw new MetadataStoreException( - "Failed to remove cookie from " + cookiePath.toStringUtf8() + "Failed to remove cookie from " + cookiePath.toString(UTF_8) + " for bookie " + bookieId + " : bad version '" + version + "'"); } else { throw new CookieNotFoundException(bookieId.toString()); } } else { log.info("Removed cookie from {} for bookie {}", - cookiePath.toStringUtf8(), bookieId); + cookiePath.toString(UTF_8), bookieId); } } @Override public String getClusterInstanceId() throws BookieException { GetResponse response = msResult( - kvClient.get(ByteSequence.fromString(getClusterInstanceIdPath(scope)))); + kvClient.get(ByteSequence.from(getClusterInstanceIdPath(scope), UTF_8))); if (response.getCount() <= 0) { log.error("BookKeeper metadata doesn't exist in Etcd. " + "Has the cluster been initialized? " @@ -410,7 +410,7 @@ public String getClusterInstanceId() throws BookieException { @Override public boolean prepareFormat() throws Exception { - ByteSequence rootScopeKey = ByteSequence.fromString(scope); + ByteSequence rootScopeKey = ByteSequence.from(scope, UTF_8); GetResponse resp = msResult(kvClient.get(rootScopeKey)); return resp.getCount() > 0; } @@ -421,7 +421,7 @@ public boolean initNewCluster() throws Exception { } static boolean initNewCluster(KV kvClient, String scope) throws Exception { - ByteSequence rootScopeKey = ByteSequence.fromString(scope); + ByteSequence rootScopeKey = ByteSequence.from(scope, UTF_8); String instanceId = UUID.randomUUID().toString(); LedgerLayout layout = new LedgerLayout( EtcdLedgerManagerFactory.class.getName(), @@ -436,62 +436,62 @@ static boolean initNewCluster(KV kvClient, String scope) throws Exception { // only put keys when root scope doesn't exist .Else( // `${scope}` - com.coreos.jetcd.op.Op.put( + io.etcd.jetcd.op.Op.put( rootScopeKey, EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/layout` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getLayoutKey(scope)), - ByteSequence.fromBytes(layout.serialize()), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getLayoutKey(scope), UTF_8), + ByteSequence.from(layout.serialize()), PutOption.DEFAULT ), // `${scope}/instanceid` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getClusterInstanceIdPath(scope)), - ByteSequence.fromString(instanceId), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getClusterInstanceIdPath(scope), UTF_8), + ByteSequence.from(instanceId, UTF_8), PutOption.DEFAULT ), // `${scope}/cookies` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getCookiesPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getCookiesPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/bookies` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getBookiesPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getBookiesPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/bookies/writable` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getWritableBookiesPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getWritableBookiesPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/bookies/readonly` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getReadonlyBookiesPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getReadonlyBookiesPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/ledgers` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getLedgersPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getLedgersPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/buckets` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getBucketsPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getBucketsPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ), // `${scope}/underreplication` - com.coreos.jetcd.op.Op.put( - ByteSequence.fromString(getUnderreplicationPath(scope)), + io.etcd.jetcd.op.Op.put( + ByteSequence.from(getUnderreplicationPath(scope), UTF_8), EtcdConstants.EMPTY_BS, PutOption.DEFAULT ) @@ -506,7 +506,7 @@ public boolean format() throws Exception { } static boolean format(KV kvClient, String scope) throws Exception { - ByteSequence rootScopeKey = ByteSequence.fromString(scope); + ByteSequence rootScopeKey = ByteSequence.from(scope, UTF_8); GetResponse resp = msResult(kvClient.get(rootScopeKey)); if (resp.getCount() <= 0) { // cluster doesn't exist @@ -524,7 +524,7 @@ public boolean nukeExistingCluster() throws Exception { } static boolean nukeExistingCluster(KV kvClient, String scope) throws Exception { - ByteSequence rootScopeKey = ByteSequence.fromString(scope); + ByteSequence rootScopeKey = ByteSequence.from(scope, UTF_8); GetResponse resp = msResult(kvClient.get(rootScopeKey)); if (resp.getCount() <= 0) { log.info("There is no existing cluster with under scope '{}' in Etcd, " @@ -535,9 +535,9 @@ static boolean nukeExistingCluster(KV kvClient, String scope) throws Exception { String bookiesPath = getBookiesPath(scope); String bookiesEndPath = getBookiesEndPath(scope); resp = msResult(kvClient.get( - ByteSequence.fromString(bookiesPath), + ByteSequence.from(bookiesPath, UTF_8), GetOption.newBuilder() - .withRange(ByteSequence.fromString(bookiesEndPath)) + .withRange(ByteSequence.from(bookiesEndPath, UTF_8)) .withKeysOnly(true) .build() )); @@ -563,7 +563,7 @@ static boolean nukeExistingCluster(KV kvClient, String scope) throws Exception { DeleteResponse delResp = msResult(kvClient.delete( rootScopeKey, DeleteOption.newBuilder() - .withRange(ByteSequence.fromString(getScopeEndKey(scope))) + .withRange(ByteSequence.from(getScopeEndKey(scope), UTF_8)) .build())); log.info("Successfully nuked cluster under scope '{}' : {} kv pairs deleted", scope, delResp.getDeleted()); diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatchClient.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatchClient.java index b3aabfe9702..381ebfa1811 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatchClient.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatchClient.java @@ -18,26 +18,28 @@ package org.apache.bookkeeper.metadata.etcd; -import static com.coreos.jetcd.common.exception.EtcdExceptionFactory.newClosedWatchClientException; -import static com.coreos.jetcd.common.exception.EtcdExceptionFactory.newEtcdException; -import static com.coreos.jetcd.common.exception.EtcdExceptionFactory.toEtcdException; - -import com.coreos.jetcd.Client; -import com.coreos.jetcd.api.WatchCancelRequest; -import com.coreos.jetcd.api.WatchCreateRequest; -import com.coreos.jetcd.api.WatchGrpc; -import com.coreos.jetcd.api.WatchRequest; -import com.coreos.jetcd.api.WatchResponse; -import com.coreos.jetcd.common.exception.ErrorCode; -import com.coreos.jetcd.common.exception.EtcdException; -import com.coreos.jetcd.common.exception.EtcdExceptionFactory; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.internal.impl.EtcdConnectionManager; -import com.coreos.jetcd.options.WatchOption; -import com.coreos.jetcd.watch.WatchResponseWithError; +import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newClosedWatchClientException; +import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newEtcdException; +import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException; + import com.google.common.base.Strings; import com.google.protobuf.ByteString; import com.google.protobuf.UnsafeByteOperations; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.EtcdConnectionManager; +import io.etcd.jetcd.api.WatchCancelRequest; +import io.etcd.jetcd.api.WatchCreateRequest; +import io.etcd.jetcd.api.WatchGrpc; +import io.etcd.jetcd.api.WatchRequest; +import io.etcd.jetcd.api.WatchResponse; +import io.etcd.jetcd.common.exception.ErrorCode; +import io.etcd.jetcd.common.exception.EtcdException; +import io.etcd.jetcd.common.exception.EtcdExceptionFactory; +import io.etcd.jetcd.options.WatchOption; +import io.etcd.jetcd.watch.WatchResponseWithError; + import io.grpc.Status; import io.grpc.Status.Code; import io.grpc.stub.StreamObserver; @@ -90,13 +92,13 @@ public synchronized boolean isClosed() { } public CompletableFuture watch(ByteSequence key, - BiConsumer consumer) { + BiConsumer consumer) { return watch(key, WatchOption.DEFAULT, consumer); } public CompletableFuture watch(ByteSequence key, WatchOption watchOption, - BiConsumer consumer) { + BiConsumer consumer) { return CompletableFuture.supplyAsync(() -> { if (isClosed()) { throw EtcdExceptionFactory.newClosedWatchClientException(); @@ -319,7 +321,7 @@ private void processEvents(WatchResponse response) { return; } - watcher.notifyWatchResponse(new WatchResponseWithError(response)); + watcher.notifyWatchResponse(new WatchResponseWithError(new io.etcd.jetcd.watch.WatchResponse(response))); watcher.setRevision( response .getEvents(response.getEventsCount() - 1) diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatcher.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatcher.java index ad3b6a38907..203bfb14253 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatcher.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/EtcdWatcher.java @@ -18,10 +18,10 @@ package org.apache.bookkeeper.metadata.etcd; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.options.WatchOption; -import com.coreos.jetcd.watch.WatchResponse; -import com.coreos.jetcd.watch.WatchResponseWithError; +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.options.WatchOption; +import io.etcd.jetcd.watch.WatchResponse; +import io.etcd.jetcd.watch.WatchResponseWithError; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.ScheduledExecutorService; @@ -86,7 +86,7 @@ void notifyWatchResponse(WatchResponseWithError watchResponse) { c.accept(null, watchResponse.getException()); } else { c.accept( - new WatchResponse(watchResponse.getWatchResponse()), + watchResponse.getWatchResponse(), null); } })); diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReader.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReader.java index d3da0597fa6..9a425d05df0 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReader.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReader.java @@ -18,15 +18,17 @@ package org.apache.bookkeeper.metadata.etcd.helpers; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.data.KeyValue; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.WatchOption; -import com.coreos.jetcd.watch.WatchResponse; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Sets; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.KeyValue; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.options.GetOption; +import io.etcd.jetcd.options.WatchOption; +import io.etcd.jetcd.watch.WatchResponse; + import java.util.Collections; import java.util.Set; import java.util.concurrent.CompletableFuture; diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeyStream.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeyStream.java index 1f23557e5e8..f9d510e5eea 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeyStream.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/KeyStream.java @@ -18,18 +18,21 @@ package org.apache.bookkeeper.metadata.etcd.helpers; -import com.coreos.jetcd.KV; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.data.KeyValue; -import com.coreos.jetcd.options.GetOption; -import com.coreos.jetcd.options.GetOption.SortOrder; -import com.coreos.jetcd.options.GetOption.SortTarget; +import static java.nio.charset.StandardCharsets.UTF_8; + import com.google.common.primitives.UnsignedBytes; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.KV; +import io.etcd.jetcd.KeyValue; +import io.etcd.jetcd.options.GetOption; + import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.function.Function; import java.util.stream.Collectors; + import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.common.concurrent.FutureUtils; @@ -83,7 +86,7 @@ public CompletableFuture> readNext() { } } if (log.isTraceEnabled()) { - log.trace("Read keys between {} and {}", beginKey.toStringUtf8(), endKey.toStringUtf8()); + log.trace("Read keys between {} and {}", beginKey.toString(UTF_8), endKey.toString(UTF_8)); } return kvClient.get( beginKey, @@ -91,8 +94,8 @@ public CompletableFuture> readNext() { .withRange(endKey) .withKeysOnly(true) .withLimit(batchSize) - .withSortField(SortTarget.KEY) - .withSortOrder(SortOrder.ASCEND) + .withSortField(GetOption.SortTarget.KEY) + .withSortOrder(GetOption.SortOrder.ASCEND) .build() ).thenApply(getResp -> { List kvs = getResp.getKvs(); diff --git a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/ValueStream.java b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/ValueStream.java index a12e99f0a0b..d974d4b6d31 100644 --- a/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/ValueStream.java +++ b/metadata-drivers/etcd/src/main/java/org/apache/bookkeeper/metadata/etcd/helpers/ValueStream.java @@ -14,13 +14,14 @@ package org.apache.bookkeeper.metadata.etcd.helpers; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.common.exception.ClosedClientException; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.options.WatchOption; -import com.coreos.jetcd.watch.WatchResponse; import com.google.common.annotations.VisibleForTesting; + +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.common.exception.ClosedClientException; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.options.WatchOption; +import io.etcd.jetcd.watch.WatchResponse; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGeneratorTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGeneratorTest.java index 53ad49bdc8f..fff2f2264ed 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGeneratorTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/Etcd64bitIdGeneratorTest.java @@ -21,8 +21,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.coreos.jetcd.Client; import com.google.common.util.concurrent.RateLimiter; +import io.etcd.jetcd.Client; import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdClusterTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdClusterTest.java index 1a7488d584a..49b9e76f394 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdClusterTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdClusterTest.java @@ -35,10 +35,11 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import com.coreos.jetcd.Client; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.kv.GetResponse; -import com.coreos.jetcd.options.GetOption; +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.Client; +import io.etcd.jetcd.kv.GetResponse; +import io.etcd.jetcd.options.GetOption; + import java.util.UUID; import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.bookie.BookieException.MetadataStoreException; @@ -211,7 +212,7 @@ private static void createNumBookies(Client client, bookiePath = EtcdUtils.getWritableBookiePath(scope, bookieId); } msResult(client.getKVClient().put( - ByteSequence.fromString(bookiePath), + ByteSequence.from(bookiePath, UTF_8), EtcdConstants.EMPTY_BS )); } @@ -230,7 +231,7 @@ private static void removeNumBookies(Client client, bookiePath = EtcdUtils.getWritableBookiePath(scope, bookieId); } msResult(client.getKVClient().delete( - ByteSequence.fromString(bookiePath) + ByteSequence.from(bookiePath, UTF_8) )); } } @@ -239,7 +240,7 @@ private static void assertClusterScope(Client client, String scope) throws Exception { GetResponse resp = msResult( client.getKVClient().get( - ByteSequence.fromString(scope))); + ByteSequence.from(scope, UTF_8))); assertEquals(1, resp.getCount()); } @@ -248,7 +249,7 @@ private static void assertClusterLayout(Client client, String layoutPath = getLayoutKey(scope); GetResponse resp = msResult( client.getKVClient().get( - ByteSequence.fromString(layoutPath))); + ByteSequence.from(layoutPath, UTF_8))); assertEquals(1, resp.getCount()); LedgerLayout layout = LedgerLayout.parseLayout( resp.getKvs().get(0).getValue().getBytes() @@ -265,7 +266,7 @@ private static void assertClusterInstanceId(Client client, String scope) throws Exception { String instanceIdPath = getClusterInstanceIdPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(instanceIdPath))); + client.getKVClient().get(ByteSequence.from(instanceIdPath, UTF_8))); assertEquals(1, resp.getCount()); String instanceId = new String(resp.getKvs().get(0).getValue().getBytes(), UTF_8); UUID uuid = UUID.fromString(instanceId); @@ -276,7 +277,7 @@ private static void assertBookiesPath(Client client, String scope) throws Exception { String bookiesPath = getBookiesPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(bookiesPath))); + client.getKVClient().get(ByteSequence.from(bookiesPath, UTF_8))); assertEquals(1, resp.getCount()); } @@ -284,7 +285,7 @@ private static void assertWritableBookiesPath(Client client, String scope) throws Exception { String bookiesPath = getWritableBookiesPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(bookiesPath))); + client.getKVClient().get(ByteSequence.from(bookiesPath, UTF_8))); assertEquals(1, resp.getCount()); } @@ -292,28 +293,28 @@ private static void assertReadonlyBookiesPath(Client client, String scope) throws Exception { String bookiesPath = getReadonlyBookiesPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(bookiesPath))); + client.getKVClient().get(ByteSequence.from(bookiesPath, UTF_8))); assertEquals(1, resp.getCount()); } private static void assertLedgersPath(Client client, String scope) throws Exception { String ledgersPath = getLedgersPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(ledgersPath))); + client.getKVClient().get(ByteSequence.from(ledgersPath, UTF_8))); assertEquals(1, resp.getCount()); } private static void assertBucketsPath(Client client, String scope) throws Exception { String bucketsPath = getBucketsPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(bucketsPath))); + client.getKVClient().get(ByteSequence.from(bucketsPath, UTF_8))); assertEquals(1, resp.getCount()); } private static void assertUnderreplicationPath(Client client, String scope) throws Exception { String urPath = getUnderreplicationPath(scope); GetResponse resp = msResult( - client.getKVClient().get(ByteSequence.fromString(urPath))); + client.getKVClient().get(ByteSequence.from(urPath, UTF_8))); assertEquals(1, resp.getCount()); } @@ -332,9 +333,9 @@ private static void assertClusterExists(Client client, String scope) throws Exce private static void assertClusterNotExists(Client client, String scope) throws Exception { GetResponse response = msResult( client.getKVClient().get( - ByteSequence.fromString(scope), + ByteSequence.from(scope, UTF_8), GetOption.newBuilder() - .withRange(ByteSequence.fromString(getScopeEndKey(scope))) + .withRange(ByteSequence.from(getScopeEndKey(scope), UTF_8)) .build())); assertEquals(0, response.getCount()); } diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdCookieTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdCookieTest.java index 1b0397e4776..c9d1a412e4a 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdCookieTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdCookieTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.bookie.BookieException.CookieNotFoundException; import org.apache.bookkeeper.bookie.BookieException.MetadataStoreException; import org.apache.bookkeeper.discover.RegistrationManager; @@ -43,6 +44,7 @@ /** * Test Etcd based cookie management. */ +@Slf4j public class EtcdCookieTest extends EtcdTestBase { @Rule @@ -53,17 +55,20 @@ public class EtcdCookieTest extends EtcdTestBase { @Before @Override public void setUp() throws Exception { + log.info("setup"); super.setUp(); String scope = RandomStringUtils.randomAlphabetic(16); this.regMgr = new EtcdRegistrationManager( newEtcdClient(), scope ); + log.info("done setup"); } @After @Override public void tearDown() throws Exception { + log.info("tear down"); this.regMgr.close(); super.tearDown(); } @@ -77,6 +82,7 @@ private static void assertCookieEquals(Versioned expected, Versioned cookie = new Versioned<>( @@ -92,10 +99,12 @@ public void readWriteRemoveCookie() throws Exception { ); regMgr.writeCookie(bookieId, cookie); + log.info("read cookie"); // read the cookie Versioned readCookie = regMgr.readCookie(bookieId); assertEquals(cookieData, new String(readCookie.getValue(), UTF_8)); + log.info("try to create cookie again"); // attempt to create the cookie again String newCookieData = RandomStringUtils.randomAlphabetic(512); Versioned newCookie = new Versioned<>( @@ -110,6 +119,7 @@ public void readWriteRemoveCookie() throws Exception { Versioned readCookie2 = regMgr.readCookie(bookieId); assertCookieEquals(readCookie, readCookie2); + log.info("update cookie with wrong version"); // attempt to update the cookie with a wrong version newCookie = new Versioned<>( newCookieData.getBytes(UTF_8), new LongVersion(Long.MAX_VALUE) @@ -122,6 +132,7 @@ public void readWriteRemoveCookie() throws Exception { readCookie2 = regMgr.readCookie(bookieId); assertCookieEquals(readCookie, readCookie2); + log.info("delete cookie with wrong version"); // delete the cookie with a wrong version LongVersion badVersion = new LongVersion(Long.MAX_VALUE); try { @@ -135,6 +146,7 @@ public void readWriteRemoveCookie() throws Exception { readCookie2 = regMgr.readCookie(bookieId); assertCookieEquals(readCookie, readCookie2); + log.info("update with right version"); // update the cookie with right version newCookie = new Versioned<>( newCookieData.getBytes(UTF_8), readCookie2.getVersion()); @@ -143,6 +155,7 @@ public void readWriteRemoveCookie() throws Exception { assertEquals(newCookieData, new String(readCookie2.getValue(), UTF_8)); assertEquals(Occurred.AFTER, readCookie2.getVersion().compare(readCookie.getVersion())); + log.info("delete with right version"); // delete the cookie with right version regMgr.removeCookie(bookieId, readCookie2.getVersion()); try { @@ -152,6 +165,7 @@ public void readWriteRemoveCookie() throws Exception { // expected } + log.info("remove non-existing cookie"); // remove a cookie that doesn't exist try { regMgr.removeCookie(bookieId, readCookie2.getVersion()); diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationTest.java index 7713d53ed17..1279ade2341 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/EtcdRegistrationTest.java @@ -24,8 +24,10 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import com.coreos.jetcd.Client; import com.google.common.collect.Sets; + +import io.etcd.jetcd.Client; + import java.util.ArrayList; import java.util.HashSet; import java.util.List; diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/HelpersTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/HelpersTest.java index ecd295db2f2..3e99b3d674a 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/HelpersTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/HelpersTest.java @@ -23,10 +23,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.coreos.jetcd.data.ByteSequence; +import io.etcd.jetcd.ByteSequence; + import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; + import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.metadata.etcd.testing.EtcdTestBase; import org.apache.commons.lang.RandomStringUtils; @@ -40,7 +42,8 @@ @Slf4j public class HelpersTest extends EtcdTestBase { - private static final Function BYTE_SEQUENCE_STRING_FUNCTION = bs -> bs.toStringUtf8(); + private static final Function BYTE_SEQUENCE_STRING_FUNCTION = + bs -> bs.toString(UTF_8); private static String getKey(String scope, int i) { return String.format("%s-key-%010d", scope, i); @@ -59,8 +62,8 @@ public void setUp() throws Exception { public void testEmptyKeyStream() throws Exception { KeyStream ks = new KeyStream<>( etcdClient.getKVClient(), - ByteSequence.fromString(getKey(scope, 0)), - ByteSequence.fromString(getKey(scope, 100)), + ByteSequence.from(getKey(scope, 0), UTF_8), + ByteSequence.from(getKey(scope, 100), UTF_8), BYTE_SEQUENCE_STRING_FUNCTION ); List values = result(ks.readNext()); @@ -109,7 +112,7 @@ public void testKeyStreamBatchUnlimited() throws Exception { private void testKeyStream(int numKeys, int batchSize) throws Exception { for (int i = 0; i < numKeys; i++) { String key = getKey(scope, i); - ByteSequence keyBs = ByteSequence.fromBytes(key.getBytes(UTF_8)); + ByteSequence keyBs = ByteSequence.from(key.getBytes(UTF_8)); result(etcdClient.getKVClient().put(keyBs, keyBs)); } @@ -131,7 +134,7 @@ private void testKeyStream(int numKeys, int batchSize) throws Exception { private void testKeyIterator(int numKeys, int batchSize) throws Exception { for (int i = 0; i < numKeys; i++) { String key = getKey(scope, i); - ByteSequence keyBs = ByteSequence.fromString(key); + ByteSequence keyBs = ByteSequence.from(key, UTF_8); result(etcdClient.getKVClient().put(keyBs, keyBs)); } @@ -190,15 +193,15 @@ public void testKeyIteratorBatchUnlimited() throws Exception { private KeyStream openKeyStream(int batchSize) { KeyStream ks = new KeyStream<>( etcdClient.getKVClient(), - ByteSequence.fromBytes(getKey(scope, 0).getBytes(UTF_8)), - ByteSequence.fromBytes(getKey(scope, Integer.MAX_VALUE).getBytes(UTF_8)), - bs -> { + ByteSequence.from(getKey(scope, 0).getBytes(UTF_8)), + ByteSequence.from(getKey(scope, Integer.MAX_VALUE).getBytes(UTF_8)), + bs -> { String[] keyParts = StringUtils.split(bs.toString(UTF_8), '-'); try { return Integer.parseInt(keyParts[2]); } catch (NumberFormatException nfe) { log.error("Failed to parse key string '{}' : ", - bs.toStringUtf8(), nfe); + bs.toString(UTF_8), nfe); return -0xabcd; } }, diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReaderTest.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReaderTest.java index 5bc52bd877b..bbc50ae62c9 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReaderTest.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/helpers/KeySetReaderTest.java @@ -23,14 +23,18 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import com.coreos.jetcd.Lease.KeepAliveListener; -import com.coreos.jetcd.data.ByteSequence; -import com.coreos.jetcd.options.PutOption; +import io.etcd.jetcd.ByteSequence; +import io.etcd.jetcd.options.PutOption; +import io.etcd.jetcd.support.CloseableClient; +import io.etcd.jetcd.support.Observers; + +import java.nio.charset.StandardCharsets; import java.util.HashSet; import java.util.Set; import java.util.concurrent.LinkedBlockingQueue; import java.util.function.Consumer; import java.util.function.Function; + import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.common.concurrent.FutureUtils; import org.apache.bookkeeper.metadata.etcd.testing.EtcdTestBase; @@ -47,12 +51,13 @@ @Slf4j public class KeySetReaderTest extends EtcdTestBase { - private static final Function BYTE_SEQUENCE_STRING_FUNCTION = bs -> bs.toStringUtf8(); + private static final Function BYTE_SEQUENCE_STRING_FUNCTION = + bs -> bs.toString(StandardCharsets.UTF_8); @Test public void testReadSingleKey() throws Exception { String key = RandomStringUtils.randomAlphabetic(16); - ByteSequence keyBs = ByteSequence.fromString(key); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); try (KeySetReader ksReader = new KeySetReader<>( etcdClient, BYTE_SEQUENCE_STRING_FUNCTION, @@ -72,7 +77,7 @@ public void testReadSingleKey() throws Exception { // update a value String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); FutureUtils.result(etcdClient.getKVClient().put(keyBs, valueBs)); // update the value should not change local value @@ -92,7 +97,7 @@ public void testReadSingleKey() throws Exception { @Test public void testWatchSingleKey() throws Exception { String key = RandomStringUtils.randomAlphabetic(16); - ByteSequence keyBs = ByteSequence.fromString(key); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); KeySetReader ksReader = null; try { ksReader = new KeySetReader<>( @@ -121,7 +126,7 @@ public void testWatchSingleKey() throws Exception { // update a value String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); FutureUtils.result(etcdClient.getKVClient().put(keyBs, valueBs)); // we should get notified with updated key set @@ -154,7 +159,7 @@ public void testWatchSingleKey() throws Exception { @Test public void testWatchSingleKeyWithTTL() throws Exception { String key = RandomStringUtils.randomAlphabetic(16); - ByteSequence keyBs = ByteSequence.fromString(key); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); KeySetReader ksReader = null; try { ksReader = new KeySetReader<>( @@ -185,7 +190,7 @@ public void testWatchSingleKeyWithTTL() throws Exception { // create a key with ttl long leaseId = FutureUtils.result(etcdClient.getLeaseClient().grant(1)).getID(); String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); FutureUtils.result(etcdClient.getKVClient() .put(keyBs, valueBs, PutOption.newBuilder().withLeaseId(leaseId).build())); @@ -218,8 +223,8 @@ public void testWatchSingleKeyWithTTL() throws Exception { @Test public void testReadKeySet() throws Exception { String prefix = RandomStringUtils.randomAlphabetic(16); - ByteSequence beginKeyBs = ByteSequence.fromString(prefix + "-000"); - ByteSequence endKeyBs = ByteSequence.fromString(prefix + "-999"); + ByteSequence beginKeyBs = ByteSequence.from(prefix + "-000", StandardCharsets.UTF_8); + ByteSequence endKeyBs = ByteSequence.from(prefix + "-999", StandardCharsets.UTF_8); try (KeySetReader ksReader = new KeySetReader<>( etcdClient, BYTE_SEQUENCE_STRING_FUNCTION, @@ -242,8 +247,8 @@ public void testReadKeySet() throws Exception { // update a value String key = String.format("%s-%03d", prefix, i); String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence keyBs = ByteSequence.fromString(key); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); expectedKeySet.add(key); FutureUtils.result(etcdClient.getKVClient().put(keyBs, valueBs)); @@ -265,8 +270,8 @@ public void testReadKeySet() throws Exception { @Test public void testWatchKeySet() throws Exception { String prefix = RandomStringUtils.randomAlphabetic(16); - ByteSequence beginKeyBs = ByteSequence.fromString(prefix + "-000"); - ByteSequence endKeyBs = ByteSequence.fromString(prefix + "-999"); + ByteSequence beginKeyBs = ByteSequence.from(prefix + "-000", StandardCharsets.UTF_8); + ByteSequence endKeyBs = ByteSequence.from(prefix + "-999", StandardCharsets.UTF_8); KeySetReader ksReader = null; try { ksReader = new KeySetReader<>( @@ -298,8 +303,8 @@ public void testWatchKeySet() throws Exception { // update a value String key = String.format("%s-%03d", prefix, i); String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence keyBs = ByteSequence.fromString(key); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); expectedKeySet.add(key); FutureUtils.result(etcdClient.getKVClient().put(keyBs, valueBs)); @@ -316,7 +321,7 @@ public void testWatchKeySet() throws Exception { for (int i = 0; i < 20; i++) { // delete the key String key = String.format("%s-%03d", prefix, i); - ByteSequence keyBs = ByteSequence.fromString(key); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); expectedKeySet.remove(key); FutureUtils.result(etcdClient.getKVClient().delete(keyBs)); @@ -341,8 +346,8 @@ public void testWatchKeySet() throws Exception { @Test public void testWatchKeySetWithTTL() throws Exception { String prefix = RandomStringUtils.randomAlphabetic(16); - ByteSequence beginKeyBs = ByteSequence.fromString(prefix + "-000"); - ByteSequence endKeyBs = ByteSequence.fromString(prefix + "-999"); + ByteSequence beginKeyBs = ByteSequence.from(prefix + "-000", StandardCharsets.UTF_8); + ByteSequence endKeyBs = ByteSequence.from(prefix + "-999", StandardCharsets.UTF_8); KeySetReader ksReader = null; try { ksReader = new KeySetReader<>( @@ -372,14 +377,15 @@ public void testWatchKeySetWithTTL() throws Exception { // create keys with ttl long leaseId = FutureUtils.result(etcdClient.getLeaseClient().grant(1)).getID(); - KeepAliveListener ka = etcdClient.getLeaseClient().keepAlive(leaseId); + CloseableClient ka = etcdClient.getLeaseClient().keepAlive(leaseId, Observers.observer(response -> { + })); Set expectedKeySet = new HashSet<>(); for (int i = 0; i < 20; i++) { String key = String.format("%s-%03d", prefix, i); String value = RandomStringUtils.randomAlphabetic(32); - ByteSequence keyBs = ByteSequence.fromString(key); - ByteSequence valueBs = ByteSequence.fromString(value); + ByteSequence keyBs = ByteSequence.from(key, StandardCharsets.UTF_8); + ByteSequence valueBs = ByteSequence.from(value, StandardCharsets.UTF_8); expectedKeySet.add(key); FutureUtils.result(etcdClient.getKVClient() .put(keyBs, valueBs, PutOption.newBuilder().withLeaseId(leaseId).build())); diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdContainer.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdContainer.java index ccc3035bad1..2ef547d1f33 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdContainer.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdContainer.java @@ -21,9 +21,9 @@ 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.LogContainerCmd; import com.github.dockerjava.api.model.Frame; -import com.github.dockerjava.core.command.LogContainerResultCallback; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -41,6 +41,13 @@ @Slf4j public class EtcdContainer extends GenericContainer { + static class LogContainerResultCb extends ResultCallback.Adapter { + @Override + public void onNext(Frame frame) { + log.info(new String(frame.getPayload(), UTF_8)); + } + } + public static final String NAME = "etcd"; public static final int CLIENT_PORT = 2379; @@ -87,7 +94,7 @@ protected void configure() { public void tailContainerLog() { CompletableFuture.runAsync(() -> { - while (null == containerId) { + while (null == this.getContainerId()) { try { TimeUnit.MILLISECONDS.sleep(100); } catch (InterruptedException e) { @@ -95,14 +102,9 @@ public void tailContainerLog() { } } - LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(containerId); + LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(this.getContainerId()); logContainerCmd.withStdOut(true).withStdErr(true).withFollowStream(true); - logContainerCmd.exec(new LogContainerResultCallback() { - @Override - public void onNext(Frame item) { - log.info(new String(item.getPayload(), UTF_8)); - } - }); + logContainerCmd.exec(new LogContainerResultCb()); }); } diff --git a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdTestBase.java b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdTestBase.java index 0ab38e3aceb..066c8c5d8a0 100644 --- a/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdTestBase.java +++ b/metadata-drivers/etcd/src/test/java/org/apache/bookkeeper/metadata/etcd/testing/EtcdTestBase.java @@ -18,10 +18,12 @@ package org.apache.bookkeeper.metadata.etcd.testing; -import com.coreos.jetcd.Client; +import io.etcd.jetcd.Client; + import java.util.Set; import java.util.concurrent.LinkedBlockingQueue; import java.util.function.Consumer; + import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.versioning.Versioned; import org.apache.commons.lang.RandomStringUtils; diff --git a/pom.xml b/pom.xml index a20c1ec04fe..a3723c6c23c 100644 --- a/pom.xml +++ b/pom.xml @@ -126,11 +126,11 @@ 1.60 5.1.0 3.1.0 - 0.0.2 + 0.5.4 1.14.9 3.0.2 - 2.1.2 - 1.18.0 + 2.4.0 + 1.33.0 30.0-jre 1.1.1 2.10.0 @@ -167,7 +167,7 @@ 1.19 3.1.8 1.3.2 - 1.8.3 + 1.15.1 3.5.3 3.6.2 1.1.7 @@ -472,8 +472,10 @@ io.grpc - grpc-all + grpc-bom ${grpc.version} + pom + import @@ -706,11 +708,23 @@ org.arquillian.cube arquillian-cube-docker ${arquillian-cube.version} + + + com.github.docker-java + * + + org.jboss.arquillian.junit arquillian-junit-standalone ${arquillian-junit.version} + + + com.github.docker-java + * + + org.codehaus.groovy diff --git a/stream/bk-grpc-name-resolver/src/main/java/org/apache/bookkeeper/grpc/resolver/BKRegistrationNameResolverProvider.java b/stream/bk-grpc-name-resolver/src/main/java/org/apache/bookkeeper/grpc/resolver/BKRegistrationNameResolverProvider.java index 1c61de72aea..456ef04ffe6 100644 --- a/stream/bk-grpc-name-resolver/src/main/java/org/apache/bookkeeper/grpc/resolver/BKRegistrationNameResolverProvider.java +++ b/stream/bk-grpc-name-resolver/src/main/java/org/apache/bookkeeper/grpc/resolver/BKRegistrationNameResolverProvider.java @@ -36,6 +36,13 @@ * An implementation of {@link NameResolverProvider} that provides {@link io.grpc.NameResolver}s * to resolve servers registered using bookkeeper registration library. */ +@SuppressWarnings("deprecation") +// One experimental API (ManagedChannelBuilder.nameResolverFactory) +// is deprecated in favor of another experimental API (NameResolverRegistry). +// https://github.com/grpc/grpc-java/issues/1770 +// https://github.com/grpc/grpc-java/issues/7133#issuecomment-680981331 +// Skipping the migration for now, will have to deal with this later when GRPC team +// finalizes their API. @Slf4j public class BKRegistrationNameResolverProvider extends NameResolverFactoryProvider { diff --git a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/impl/channel/StorageServerChannel.java b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/impl/channel/StorageServerChannel.java index afacce18b72..d581c942eb5 100644 --- a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/impl/channel/StorageServerChannel.java +++ b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/impl/channel/StorageServerChannel.java @@ -97,11 +97,15 @@ public StorageServerChannel(Endpoint endpoint, EndpointResolver endpointResolver) { this.token = token; Endpoint resolvedEndpoint = endpointResolver.resolve(endpoint); - this.channel = ManagedChannelBuilder.forAddress( + ManagedChannelBuilder channelBuilder = ManagedChannelBuilder.forAddress( resolvedEndpoint.getHostname(), - resolvedEndpoint.getPort()) - .usePlaintext(usePlainText) - .build(); + resolvedEndpoint.getPort()); + if (usePlainText) { + channelBuilder.usePlaintext(); + } else { + channelBuilder.useTransportSecurity(); + } + this.channel = channelBuilder.build(); this.interceptedServerChannel = null; } diff --git a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcChannels.java b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcChannels.java index f05caec6736..fdd93e31b3d 100644 --- a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcChannels.java +++ b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcChannels.java @@ -46,6 +46,13 @@ private GrpcChannels() {} * @param settings client settings * @return managed channel builder */ + @SuppressWarnings("deprecation") + // One experimental API (ManagedChannelBuilder.nameResolverFactory) + // is deprecated in favor of another experimental API (NameResolverRegistry). + // https://github.com/grpc/grpc-java/issues/1770 + // https://github.com/grpc/grpc-java/issues/7133#issuecomment-680981331 + // Skipping the migration for now, will have to deal with this later when GRPC team + // finalizes their API. public static ManagedChannelBuilder createChannelBuilder(String serviceUri, StorageClientSettings settings) { ServiceURI uri = ServiceURI.create(serviceUri); diff --git a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcUtils.java b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcUtils.java index 02a202fa9e9..52a534f5071 100644 --- a/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcUtils.java +++ b/stream/clients/java/base/src/main/java/org/apache/bookkeeper/clients/utils/GrpcUtils.java @@ -20,7 +20,7 @@ import static org.apache.bookkeeper.clients.utils.ClientConstants.TOKEN; -import io.grpc.CallCredentials2; +import io.grpc.CallCredentials; import io.grpc.Metadata; import io.grpc.stub.AbstractStub; import java.util.Optional; @@ -48,7 +48,7 @@ public static > T configureGrpcStub(T stub, Optional tokenKey = Metadata.Key.of(TOKEN, Metadata.ASCII_STRING_MARSHALLER); metadata.put(tokenKey, t); - CallCredentials2 callCredentials = new CallCredentials2() { + CallCredentials callCredentials = new CallCredentials() { @Override public void applyRequestMetadata(RequestInfo requestInfo, Executor appExecutor, diff --git a/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/NameResolverProviderFactory.java b/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/NameResolverProviderFactory.java index 571ef6f7f98..48baa94d247 100644 --- a/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/NameResolverProviderFactory.java +++ b/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/NameResolverProviderFactory.java @@ -21,7 +21,6 @@ import static com.google.common.base.Preconditions.checkState; -import io.grpc.Attributes; import io.grpc.NameResolver; import io.grpc.NameResolverProvider; import java.net.URI; @@ -39,7 +38,7 @@ public NameResolverProviderFactory(List providers) { } @Override - public NameResolver newNameResolver(URI targetUri, Attributes params) { + public NameResolver newNameResolver(URI targetUri, NameResolver.Args params) { checkForProviders(); for (NameResolverProvider provider : providers) { NameResolver resolver = provider.newNameResolver(targetUri, params); diff --git a/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/ServiceNameResolverProvider.java b/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/ServiceNameResolverProvider.java index 05bf7b5b6d6..53e74891f90 100644 --- a/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/ServiceNameResolverProvider.java +++ b/stream/common/src/main/java/org/apache/bookkeeper/common/resolver/ServiceNameResolverProvider.java @@ -20,7 +20,6 @@ import com.google.common.base.Function; import com.google.common.collect.Lists; -import io.grpc.Attributes; import io.grpc.NameResolver; import io.grpc.NameResolverProvider; import io.grpc.internal.DnsNameResolverProvider; @@ -71,7 +70,7 @@ protected int priority() { @Nullable @Override - public NameResolver newNameResolver(URI targetUri, Attributes params) { + public NameResolver newNameResolver(URI targetUri, NameResolver.Args params) { ServiceURI serviceURI; try { serviceURI = ServiceURI.create(targetUri); 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 7beb2912a9e..4e32d5f3076 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 @@ -81,7 +81,7 @@ public void start() { }); super.start(); - log.info("Start a standalone bookkeeper cluster at container {}", containerName); + log.info("Start a standalone bookkeeper cluster at container {}", this.getContainerName()); } @Override @@ -91,7 +91,7 @@ public boolean equals(Object o) { } BKStandaloneContainer another = (BKStandaloneContainer) o; - return containerName.equals(another.containerName) + return this.getContainerName().equals(another.getContainerName()) && numBookies == another.numBookies && super.equals(another); } @@ -99,7 +99,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return 31 * super.hashCode() + Objects.hash( - containerName, + this.getContainerName(), numBookies); } } 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 f155d74b4ae..9e430e0fa00 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 @@ -65,7 +65,7 @@ public String getExternalGrpcEndpointStr() { } public String getInternalGrpcEndpointStr() { - return DockerUtils.getContainerIP(dockerClient, containerId) + ":" + BOOKIE_GRPC_PORT; + return DockerUtils.getContainerIP(dockerClient, this.getContainerId()) + ":" + BOOKIE_GRPC_PORT; } @Override @@ -113,7 +113,7 @@ public void start() { @Override protected void beforeStop() { super.beforeStop(); - if (null != containerId) { + if (null != this.getContainerId()) { DockerUtils.dumpContainerDirToTargetCompressed( getDockerClient(), getContainerName(), 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 d6b146786cd..35d3023381c 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 @@ -20,9 +20,9 @@ import static java.nio.charset.StandardCharsets.UTF_8; +import com.github.dockerjava.api.async.ResultCallback; import com.github.dockerjava.api.command.LogContainerCmd; import com.github.dockerjava.api.model.Frame; -import com.github.dockerjava.core.command.LogContainerResultCallback; import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -37,6 +37,13 @@ @Slf4j public class ChaosContainer> extends GenericContainer { + static class LogContainerResultCb extends ResultCallback.Adapter { + @Override + public void onNext(Frame frame) { + log.info(new String(frame.getPayload(), UTF_8)); + } + } + protected final String clusterName; protected ChaosContainer(String clusterName, String image) { @@ -45,7 +52,7 @@ protected ChaosContainer(String clusterName, String image) { } protected void beforeStop() { - if (null == containerId) { + if (null == this.getContainerId()) { return; } @@ -63,7 +70,7 @@ public void stop() { public void tailContainerLog() { CompletableFuture.runAsync(() -> { - while (null == containerId) { + while (null == this.getContainerId()) { try { TimeUnit.MILLISECONDS.sleep(100); } catch (InterruptedException e) { @@ -71,29 +78,19 @@ public void tailContainerLog() { } } - LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(containerId); + LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(this.getContainerId()); logContainerCmd.withStdOut(true).withStdErr(true).withFollowStream(true); - logContainerCmd.exec(new LogContainerResultCallback() { - @Override - public void onNext(Frame item) { - log.info(new String(item.getPayload(), UTF_8)); - } - }); + logContainerCmd.exec(new LogContainerResultCb()); }); } public String getContainerLog() { StringBuilder sb = new StringBuilder(); - LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(containerId); + LogContainerCmd logContainerCmd = this.dockerClient.logContainerCmd(this.getContainerId()); logContainerCmd.withStdOut(true).withStdErr(true); try { - logContainerCmd.exec(new LogContainerResultCallback() { - @Override - public void onNext(Frame item) { - sb.append(new String(item.getPayload(), UTF_8)); - } - }).awaitCompletion(); + logContainerCmd.exec(new LogContainerResultCb()).awaitCompletion(); } catch (InterruptedException e) { } @@ -103,13 +100,13 @@ public void onNext(Frame item) { public ExecResult execCmd(String... cmd) throws Exception { String cmdString = StringUtils.join(cmd, " "); - log.info("DOCKER.exec({}:{}): Executing ...", containerId, cmdString); + log.info("DOCKER.exec({}:{}): Executing ...", this.getContainerId(), cmdString); ExecResult result = execInContainer(cmd); - log.info("Docker.exec({}:{}): Done", containerId, cmdString); - log.info("Docker.exec({}:{}): Stdout -\n{}", containerId, cmdString, result.getStdout()); - log.info("Docker.exec({}:{}): Stderr -\n{}", containerId, cmdString, result.getStderr()); + log.info("Docker.exec({}:{}): Done", this.getContainerId(), cmdString); + log.info("Docker.exec({}:{}): Stdout -\n{}", this.getContainerId(), cmdString, result.getStdout()); + log.info("Docker.exec({}:{}): Stderr -\n{}", this.getContainerId(), cmdString, result.getStderr()); return result; } 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 0b7c46a1182..c417b031998 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 @@ -72,7 +72,7 @@ public void start() { super.start(); log.info("Start a zookeeper server at container {} : external service uri = {}, internal service uri = {}", - containerName, getExternalServiceUri(), getInternalServiceUri()); + this.getContainerName(), getExternalServiceUri(), getInternalServiceUri()); } } diff --git a/tests/integration-tests-utils/pom.xml b/tests/integration-tests-utils/pom.xml index 341b91b534e..8168f4763e0 100644 --- a/tests/integration-tests-utils/pom.xml +++ b/tests/integration-tests-utils/pom.xml @@ -52,6 +52,17 @@ org.arquillian.cube arquillian-cube-docker + + + com.github.docker-java + * + + + + + + org.testcontainers + testcontainers diff --git a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java index 891c1ce023c..415c1b3e373 100644 --- a/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java +++ b/tests/integration-tests-utils/src/main/java/org/apache/bookkeeper/tests/integration/utils/DockerUtils.java @@ -209,7 +209,7 @@ public void onComplete() { Thread.sleep(200); resp = docker.inspectExecCmd(execid).exec(); } - int retCode = resp.getExitCode(); + long retCode = resp.getExitCodeLong(); if (retCode != 0) { LOG.error("DOCKER.exec({}:{}): failed with {} : {}", containerId, cmdString, retCode, output); if (!ignoreError) {