Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update datasketches version from 0.8.3 to 3.2.0 #3264

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ Apache Software License, Version 2.
- lib/org.eclipse.jetty-jetty-util-ajax-9.4.46.v20220331.jar [22]
- lib/org.rocksdb-rocksdbjni-6.29.4.1.jar [23]
- lib/com.beust-jcommander-1.78.jar [24]
- lib/com.yahoo.datasketches-memory-0.8.3.jar [25]
- lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25]
- lib/org.apache.datasketches-datasketches-java-3.2.0.jar [25]
- lib/org.apache.datasketches-datasketches-memory-2.0.0.jar [25]
- lib/net.jpountz.lz4-lz4-1.3.0.jar [26]
- lib/com.google.api.grpc-proto-google-common-protos-2.0.1.jar [28]
- lib/com.google.code.gson-gson-2.8.9.jar [29]
Expand Down Expand Up @@ -338,7 +338,7 @@ Apache Software License, Version 2.
[22] Source available at https://github.com/eclipse/jetty.project/tree/jetty-9.4.46.v20220331
[23] Source available at https://github.com/facebook/rocksdb/tree/v6.22.1
[24] Source available at https://github.com/cbeust/jcommander/tree/1.78
[25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3
[25] Source available at https://github.com/apache/datasketches-java/tree/3.2.0
[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0
[28] Source available at https://github.com/googleapis/googleapis
[29] Source available at https://github.com/google/gson/tree/gson-parent-2.8.9
Expand Down
6 changes: 3 additions & 3 deletions bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ Apache Software License, Version 2.
- lib/org.eclipse.jetty-jetty-util-ajax-9.4.46.v20220331.jar [22]
- lib/org.rocksdb-rocksdbjni-6.29.4.1.jar [23]
- lib/com.beust-jcommander-1.78.jar [24]
- lib/com.yahoo.datasketches-memory-0.8.3.jar [25]
- lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25]
- lib/org.apache.datasketches-datasketches-java-3.2.0.jar [25]
- lib/org.apache.datasketches-datasketches-memory-2.0.0.jar [25]
- lib/net.jpountz.lz4-lz4-1.3.0.jar [26]
- lib/com.google.api.grpc-proto-google-common-protos-2.0.1.jar [28]
- lib/com.google.code.gson-gson-2.8.9.jar [29]
Expand Down Expand Up @@ -335,7 +335,7 @@ Apache Software License, Version 2.
[22] Source available at https://github.com/eclipse/jetty.project/tree/jetty-9.4.46.v20220331
[23] Source available at https://github.com/facebook/rocksdb/tree/v6.16.4
[24] Source available at https://github.com/cbeust/jcommander/tree/1.78
[25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3
[25] Source available at https://github.com/apache/datasketches-java/tree/3.2.0
[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0
[28] Source available at https://github.com/googleapis/googleapis
[29] Source available at https://github.com/google/gson/tree/gson-parent-2.8.9
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ depVersions = [
commonsLang3: "3.6",
commonsBeanutils: "1.9.3",
curator: "5.1.0",
datasketches: "3.2.0",
dockerJava: "3.2.13",
dropwizard: "4.1.12.1",
errorprone: "2.4.0",
Expand Down Expand Up @@ -86,7 +87,6 @@ depVersions = [
thrift: "0.14.2",
testcontainers: "1.16.3",
vertx: "3.9.8",
yahooDatasketches: "0.8.3",
zookeeper: "3.8.0",
]

Expand Down Expand Up @@ -115,6 +115,7 @@ depLibs = [
curatorRecipes: dependencies.create("org.apache.curator:curator-recipes:${depVersions.curator}") {
exclude group: 'org.apache.curator', module: 'curator-framework'
},
datasketches: "org.apache.datasketches:datasketches-java:${depVersions.datasketches}",
dockerJava: "com.github.docker-java:docker-java:${depVersions.dockerJava}",
errorprone: "com.google.errorprone:error_prone_annotations:${depVersions.errorprone}",
etcd: dependencies.create("io.etcd:jetcd-core:${depVersions.etcd}") {
Expand Down Expand Up @@ -235,7 +236,6 @@ depLibs = [
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'io.netty'
},
yahooDatasketches: "com.yahoo.datasketches:sketches-core:${depVersions.yahooDatasketches}",
zookeeper: dependencies.create("org.apache.zookeeper:zookeeper:${depVersions.zookeeper}") {
exclude group: 'io.netty'
exclude group: 'ch.qos.logback'
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<ostrich.version>9.1.3</ostrich.version>
<powermock.version>2.0.9</powermock.version>
<prometheus.version>0.8.1</prometheus.version>
<datasketches.version>0.8.3</datasketches.version>
<datasketches.version>3.2.0</datasketches.version>
<httpclient.version>4.5.13</httpclient.version>
<httpcore.version>4.4.15</httpcore.version>
<protobuf.version>3.19.2</protobuf.version>
Expand Down Expand Up @@ -626,8 +626,8 @@
</dependency>
<!-- data-sketches -->
<dependency>
<groupId>com.yahoo.datasketches</groupId>
<artifactId>sketches-core</artifactId>
<groupId>org.apache.datasketches</groupId>
<artifactId>datasketches-java</artifactId>
<version>${datasketches.version}</version>
</dependency>

Expand Down
8 changes: 8 additions & 0 deletions src/owasp-dependency-check-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,13 @@ file name: netty-tcnative-boringssl-static-2.0.50.Final-windows-x86_64.jar
<sha1>b6211fb3224bfd2dadf10273a15211f592174652</sha1>
<cve>CVE-2015-1205</cve>
</suppress>
<!-- DataSketches false positive https://github.com/apache/datasketches-java/issues/397 -->
<suppress>
<notes><![CDATA[
file name: datasketches-java-3.2.0.jar
]]></notes>
<sha1>ceb2774dcd51210437a2f139b64d33213bf7f523</sha1>
<cve>CVE-2021-40531</cve>
</suppress>
</suppressions>

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation depLibs.prometheusSimpleClientHotspot
implementation depLibs.prometheusSimpleClientServlet
implementation depLibs.slf4j
implementation depLibs.yahooDatasketches
implementation depLibs.datasketches

testCompileOnly depLibs.lombok
testImplementation depLibs.junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>com.yahoo.datasketches</groupId>
<artifactId>sketches-core</artifactId>
<groupId>org.apache.datasketches</groupId>
<artifactId>datasketches-java</artifactId>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
*/
package org.apache.bookkeeper.stats.prometheus;

import com.yahoo.sketches.quantiles.DoublesSketch;
import com.yahoo.sketches.quantiles.DoublesSketchBuilder;
import com.yahoo.sketches.quantiles.DoublesUnion;
import com.yahoo.sketches.quantiles.DoublesUnionBuilder;

import io.netty.util.concurrent.FastThreadLocal;

import java.util.Map;
Expand All @@ -31,6 +26,11 @@

import org.apache.bookkeeper.stats.OpStatsData;
import org.apache.bookkeeper.stats.OpStatsLogger;
import org.apache.datasketches.quantiles.DoublesSketch;
import org.apache.datasketches.quantiles.DoublesSketchBuilder;
import org.apache.datasketches.quantiles.DoublesUnion;
import org.apache.datasketches.quantiles.DoublesUnionBuilder;
import org.apache.datasketches.quantiles.UpdateDoublesSketch;

/**
* OpStatsLogger implementation that uses DataSketches library to calculate the approximated latency quantiles.
Expand Down Expand Up @@ -193,8 +193,8 @@ public void initializeThread(Map<String, String> labels) {
}

private static class LocalData {
private final DoublesSketch successSketch = new DoublesSketchBuilder().build();
private final DoublesSketch failSketch = new DoublesSketchBuilder().build();
private final UpdateDoublesSketch successSketch = new DoublesSketchBuilder().build();
private final UpdateDoublesSketch failSketch = new DoublesSketchBuilder().build();
private final StampedLock lock = new StampedLock();
}

Expand Down