Skip to content

Commit

Permalink
Upgrade Apache BookKeeper Client to 4.11.1 (apache#8270)
Browse files Browse the repository at this point in the history
Motivation
Upgrade Apache BookKeeper client to version 4.11.1 and RocksDB to 6.10.2 (needed by Bookie)

Modifications
Upgrade Apache BookKeeper client, fix a few build errors, due to the introduction of BookieServiceInfo structure (see BP-38).

Verifying this change
This change is already covered by existing tests

* Upgrade Apache BookKeeper to 4.11.1

* fix build

* fix LICENSE files

* Use BK 4.11.1

* Upgrade RocksDB to 6.10.2

* Fix license and upgrade maven assembly plugin

* update license

* restore bouncy castle license

* fix licenses

* Exclude BouncyCastle inherited from BK

Co-authored-by: Enrico Olivelli <[email protected]>
Co-authored-by: Enrico Olivelli <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2020
1 parent b2c0f59 commit 465964b
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 78 deletions.
1 change: 1 addition & 0 deletions distribution/io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
1 change: 1 addition & 0 deletions distribution/offloaders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
20 changes: 4 additions & 16 deletions distribution/server/licenses/LICENSE-bouncycastle.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
The Bouncy Castle License
Copyright (c) 2000 - 2020 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)

Copyright (c) 2000-2015 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:

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 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.
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.
1 change: 1 addition & 0 deletions distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>distro-assembly</id>
Expand Down
58 changes: 31 additions & 27 deletions distribution/server/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -392,32 +392,35 @@ The Apache Software License, Version 2.0
- org.apache.logging.log4j-log4j-web-2.10.0.jar
* Java Native Access JNA -- net.java.dev.jna-jna-4.2.0.jar
* BookKeeper
- org.apache.bookkeeper-bookkeeper-common-4.10.0.jar
- org.apache.bookkeeper-bookkeeper-common-allocator-4.10.0.jar
- org.apache.bookkeeper-bookkeeper-proto-4.10.0.jar
- org.apache.bookkeeper-bookkeeper-server-4.10.0.jar
- org.apache.bookkeeper-bookkeeper-tools-framework-4.10.0.jar
- org.apache.bookkeeper-circe-checksum-4.10.0.jar
- org.apache.bookkeeper-cpu-affinity-4.10.0.jar
- org.apache.bookkeeper-statelib-4.10.0.jar
- org.apache.bookkeeper-stream-storage-api-4.10.0.jar
- org.apache.bookkeeper-stream-storage-common-4.10.0.jar
- org.apache.bookkeeper-stream-storage-java-client-4.10.0.jar
- org.apache.bookkeeper-stream-storage-java-client-base-4.10.0.jar
- org.apache.bookkeeper-stream-storage-proto-4.10.0.jar
- org.apache.bookkeeper-stream-storage-server-4.10.0.jar
- org.apache.bookkeeper-stream-storage-service-api-4.10.0.jar
- org.apache.bookkeeper-stream-storage-service-impl-4.10.0.jar
- org.apache.bookkeeper.http-http-server-4.10.0.jar
- org.apache.bookkeeper.http-vertx-http-server-4.10.0.jar
- org.apache.bookkeeper.stats-bookkeeper-stats-api-4.10.0.jar
- org.apache.bookkeeper.stats-prometheus-metrics-provider-4.10.0.jar
- org.apache.bookkeeper.tests-stream-storage-tests-common-4.10.0.jar
- org.apache.distributedlog-distributedlog-common-4.10.0.jar
- org.apache.distributedlog-distributedlog-core-4.10.0-tests.jar
- org.apache.distributedlog-distributedlog-core-4.10.0.jar
- org.apache.distributedlog-distributedlog-protocol-4.10.0.jar
- org.apache.bookkeeper.stats-codahale-metrics-provider-4.10.0.jar
- org.apache.bookkeeper-bookkeeper-common-4.11.1.jar
- org.apache.bookkeeper-bookkeeper-common-allocator-4.11.1.jar
- org.apache.bookkeeper-bookkeeper-proto-4.11.1.jar
- org.apache.bookkeeper-bookkeeper-server-4.11.1.jar
- org.apache.bookkeeper-bookkeeper-tools-framework-4.11.1.jar
- org.apache.bookkeeper-circe-checksum-4.11.1.jar
- org.apache.bookkeeper-cpu-affinity-4.11.1.jar
- org.apache.bookkeeper-statelib-4.11.1.jar
- org.apache.bookkeeper-stream-storage-api-4.11.1.jar
- org.apache.bookkeeper-stream-storage-common-4.11.1.jar
- org.apache.bookkeeper-stream-storage-java-client-4.11.1.jar
- org.apache.bookkeeper-stream-storage-java-client-base-4.11.1.jar
- org.apache.bookkeeper-stream-storage-proto-4.11.1.jar
- org.apache.bookkeeper-stream-storage-server-4.11.1.jar
- org.apache.bookkeeper-stream-storage-service-api-4.11.1.jar
- org.apache.bookkeeper-stream-storage-service-impl-4.11.1.jar
- org.apache.bookkeeper.http-http-server-4.11.1.jar
- org.apache.bookkeeper.http-vertx-http-server-4.11.1.jar
- org.apache.bookkeeper.stats-bookkeeper-stats-api-4.11.1.jar
- org.apache.bookkeeper.stats-prometheus-metrics-provider-4.11.1.jar
- org.apache.bookkeeper.tests-stream-storage-tests-common-4.11.1.jar
- org.apache.distributedlog-distributedlog-common-4.11.1.jar
- org.apache.distributedlog-distributedlog-core-4.11.1-tests.jar
- org.apache.distributedlog-distributedlog-core-4.11.1.jar
- org.apache.distributedlog-distributedlog-protocol-4.11.1.jar
- org.apache.bookkeeper.stats-codahale-metrics-provider-4.11.1.jar
* Apache HTTP Client
- org.apache.httpcomponents-httpclient-4.5.5.jar
- org.apache.httpcomponents-httpcore-4.4.9.jar
* AirCompressor
- io.airlift-aircompressor-0.16.jar
* AsyncHttpClient
Expand All @@ -442,8 +445,9 @@ The Apache Software License, Version 2.0
- org.eclipse.jetty.websocket-websocket-server-9.4.31.v20200723.jar
- org.eclipse.jetty.websocket-websocket-servlet-9.4.31.v20200723.jar
* SnakeYaml -- org.yaml-snakeyaml-1.26.jar
* RocksDB - org.rocksdb-rocksdbjni-5.13.3.jar
* RocksDB - org.rocksdb-rocksdbjni-6.10.2.jar
* Google Error Prone Annotations - com.google.errorprone-error_prone_annotations-2.1.3.jar
* Apache Thrifth - org.apache.thrift-libthrift-0.12.0.jar
* OkHttp
- com.squareup.okhttp-okhttp-2.5.0.jar
* Okio - com.squareup.okio-okio-1.13.0.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Supplier;
import org.apache.bookkeeper.bookie.Bookie;
import org.apache.bookkeeper.bookie.BookieException;
import org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage;
Expand All @@ -46,6 +47,7 @@
import org.apache.bookkeeper.conf.AbstractConfiguration;
import org.apache.bookkeeper.conf.ClientConfiguration;
import org.apache.bookkeeper.conf.ServerConfiguration;
import org.apache.bookkeeper.discover.BookieServiceInfo;
import org.apache.bookkeeper.metastore.InMemoryMetaStore;
import org.apache.bookkeeper.net.BookieSocketAddress;
import org.apache.bookkeeper.proto.BookieServer;
Expand Down Expand Up @@ -469,7 +471,7 @@ protected BookieServer startBookie(ServerConfiguration conf) throws Exception {
protected BookieServer startBookie(ServerConfiguration conf, final Bookie b) throws Exception {
BookieServer server = new BookieServer(conf) {
@Override
protected Bookie newBookie(ServerConfiguration conf, ByteBufAllocator allocator)
protected Bookie newBookie(ServerConfiguration conf, ByteBufAllocator allocator, Supplier<BookieServiceInfo> bookieServiceInfoProvider)
throws IOException, KeeperException, InterruptedException, BookieException {
return b;
}
Expand Down
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ flexible messaging model and an intuitive client API.</description>
<!-- apache commons -->
<commons-compress.version>1.19</commons-compress.version>

<bookkeeper.version>4.10.0</bookkeeper.version>
<bookkeeper.version>4.11.1</bookkeeper.version>
<zookeeper.version>3.5.7</zookeeper.version>
<netty.version>4.1.51.Final</netty.version>
<netty-tc-native.version>2.0.30.Final</netty-tc-native.version>
Expand All @@ -109,7 +109,7 @@ flexible messaging model and an intuitive client API.</description>
<prometheus.version>0.5.0</prometheus.version>
<aspectj.version>1.9.2</aspectj.version>
<vertx.version>3.5.3</vertx.version>
<rocksdb.version>5.13.3</rocksdb.version>
<rocksdb.version>6.10.2</rocksdb.version>
<slf4j.version>1.7.25</slf4j.version>
<commons.collections.version>3.2.2</commons.collections.version>
<log4j2.version>2.10.0</log4j2.version>
Expand Down Expand Up @@ -299,6 +299,10 @@ flexible messaging model and an intuitive client API.</description>
<artifactId>bookkeeper-server</artifactId>
<version>${bookkeeper.version}</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -1032,6 +1036,10 @@ flexible messaging model and an intuitive client API.</description>
<scope>test</scope>
<classifier>tests</classifier>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.apache.bookkeeper.replication.AutoRecoveryMain;
import org.apache.bookkeeper.stats.StatsProvider;
import org.apache.bookkeeper.common.util.ReflectionUtils;
import org.apache.bookkeeper.discover.BookieServiceInfo;
import org.apache.bookkeeper.util.DirectMemoryUtils;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.pulsar.broker.PulsarServerException;
Expand Down Expand Up @@ -248,7 +249,7 @@ && isBlank(starterArguments.bookieConfigFile)) {
if (starterArguments.runBookie) {
checkNotNull(bookieConfig, "No ServerConfiguration for Bookie");
checkNotNull(bookieStatsProvider, "No Stats Provider for Bookie");
bookieServer = new BookieServer(bookieConfig, bookieStatsProvider.getStatsLogger(""));
bookieServer = new BookieServer(bookieConfig, bookieStatsProvider.getStatsLogger(""), BookieServiceInfo.NO_INFO);
} else {
bookieServer = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.bookkeeper.client.BookKeeper.DigestType;
import org.apache.bookkeeper.client.LedgerHandle;
import org.apache.bookkeeper.conf.ServerConfiguration;
import org.apache.bookkeeper.discover.BookieServiceInfo;
import org.apache.bookkeeper.net.BookieSocketAddress;
import org.apache.bookkeeper.proto.BookieServer;
import org.apache.bookkeeper.stats.NullStatsLogger;
Expand Down Expand Up @@ -70,7 +71,7 @@ protected void setup() throws Exception {
String addr = String.format("10.0.0.%d", i + 1);
conf.setAdvertisedAddress(addr);

BookieServer bs = new BookieServer(conf, NullStatsLogger.INSTANCE);
BookieServer bs = new BookieServer(conf, NullStatsLogger.INSTANCE, BookieServiceInfo.NO_INFO);

bs.start();
bookies.add(bs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.apache.bookkeeper.client.EnsemblePlacementPolicy;
import org.apache.bookkeeper.client.PulsarMockBookKeeper;
import org.apache.bookkeeper.stats.StatsLogger;
import org.apache.bookkeeper.test.PortManager;
import org.apache.bookkeeper.util.ZkUtils;
import org.apache.pulsar.broker.BookKeeperClientFactory;
import org.apache.pulsar.broker.PulsarService;
Expand Down
1 change: 1 addition & 0 deletions pulsar-functions/runtime-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
Expand Down
47 changes: 23 additions & 24 deletions pulsar-sql/presto-distribution/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ The Apache Software License, Version 2.0
- netty-resolver-dns-4.1.51.Final.jar
- netty-tcnative-boringssl-static-2.0.30.Final.jar
- netty-transport-4.1.51.Final.jar
- netty-transport-native-epoll-4.1.51.Final.jar
- netty-transport-native-epoll-4.1.51.Final-linux-x86_64.jar
- netty-transport-native-unix-common-4.1.51.Final.jar
- netty-transport-native-unix-common-4.1.51.Final-linux-x86_64.jar
Expand Down Expand Up @@ -301,6 +300,9 @@ The Apache Software License, Version 2.0
- stats-0.195.jar
- trace-token-0.195.jar
- units-1.6.jar
* Apache HTTP Client
- httpclient-4.5.5.jar
- httpcore-4.4.9.jar
* Error Prone Annotations
- error_prone_annotations-2.1.3.jar
* Esri Geometry API For Java
Expand Down Expand Up @@ -383,7 +385,7 @@ The Apache Software License, Version 2.0
- presto-plugin-toolkit-332.jar
- presto-spi-332.jar
* RocksDB JNI
- rocksdbjni-5.13.3.jar
- rocksdbjni-6.10.2.jar
* SnakeYAML
- snakeyaml-1.26.jar
* Bean Validation API
Expand All @@ -406,25 +408,25 @@ The Apache Software License, Version 2.0
- async-http-client-2.12.1.jar
- async-http-client-netty-utils-2.12.1.jar
* Apache Bookkeeper
- bookkeeper-common-4.10.0.jar
- bookkeeper-common-allocator-4.10.0.jar
- bookkeeper-proto-4.10.0.jar
- bookkeeper-server-4.10.0.jar
- bookkeeper-stats-api-4.10.0.jar
- bookkeeper-tools-framework-4.10.0.jar
- circe-checksum-4.10.0.jar
- codahale-metrics-provider-4.10.0.jar
- cpu-affinity-4.10.0.jar
- http-server-4.10.0.jar
- prometheus-metrics-provider-4.10.0.jar
- bookkeeper-common-4.11.1.jar
- bookkeeper-common-allocator-4.11.1.jar
- bookkeeper-proto-4.11.1.jar
- bookkeeper-server-4.11.1.jar
- bookkeeper-stats-api-4.11.1.jar
- bookkeeper-tools-framework-4.11.1.jar
- circe-checksum-4.11.1.jar
- codahale-metrics-provider-4.11.1.jar
- cpu-affinity-4.11.1.jar
- http-server-4.11.1.jar
- prometheus-metrics-provider-4.11.1.jar
* Apache Commons
- commons-cli-1.2.jar
- commons-codec-1.10.jar
- commons-collections4-4.1.jar
- commons-configuration-1.10.jar
- commons-io-2.5.jar
- commons-lang-2.6.jar
- commons-logging-1.1.1.jar
- commons-logging-1.2.jar
* GSON
- gson-2.8.2.jar
* Jackson
Expand Down Expand Up @@ -506,13 +508,11 @@ CDDL-1.1 -- licenses/LICENSE-CDDL-1.1.txt
- javax.activation-1.2.0.jar
- javax.activation-api-1.2.0.jar
- jakarta.activation-api-1.2.1.jar
- jakarta.validation-api-2.0.2.jar
- jakarta.ws.rs-api-2.1.6.jar
* HK2 - Dependency Injection Kernel
- hk2-api-2.6.1.jar
- hk2-locator-2.6.1.jar
- hk2-utils-2.6.1.jar
- jakarta.inject-2.6.1.jar
- aopalliance-repackaged-2.6.1.jar
* Jersey
- jaxrs-0.195.jar
- jersey-client-2.31.jar
Expand All @@ -523,11 +523,8 @@ CDDL-1.1 -- licenses/LICENSE-CDDL-1.1.txt
- jersey-server-2.31.jar
- jersey-common-2.31.jar
- jersey-entity-filtering-2.31.jar
- jersey-hk2-2.31.jar
- jersey-media-json-jackson-2.31.jar
- jersey-media-multipart-2.31.jar
- aopalliance-repackaged-2.6.1.jar

* JAXB
- jaxb-api-2.3.1.jar

Expand All @@ -552,6 +549,9 @@ CDDL-1.1 -- licenses/LICENSE-CDDL-1.1.txt

Eclipse Public License - v2.0 -- licenses/LICENSE-EPL-2.0.txt
* jakarta.annotation-api-1.3.5.jar
* jakarta.inject-2.6.1.jar
* jakarta.validation-api-2.0.2.jar
* jakarta.ws.rs-api-2.1.6.jar

Public Domain (CC0) -- licenses/LICENSE-CC0.txt
* HdrHistogram
Expand All @@ -567,7 +567,6 @@ Creative Commons Attribution License

Bouncy Castle License
* Bouncy Castle -- licenses/LICENSE-bouncycastle.txt
- bcpkix-jdk15on-1.66.jar
- bcprov-ext-jdk15on-1.66.jar
- bcprov-jdk15on-1.66.jar
- bouncy-castle-bc-2.7.0-SNAPSHOT-pkg.jar
- - bcpkix-jdk15on-1.66.jar
- - bcprov-ext-jdk15on-1.66.jar
- - bcprov-jdk15on-1.66.jar
Loading

0 comments on commit 465964b

Please sign in to comment.