Skip to content

Commit d3f9717

Browse files
Merge pull request #43 from DataDog/cmasson/remove_gk
Remove GK sketch
2 parents 750f2c9 + b2f1e9f commit d3f9717

File tree

5 files changed

+7
-397
lines changed

5 files changed

+7
-397
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# sketches-java
22

3-
This repo contains Java implementations of the distributed quantile sketch algorithms `DDSketch` [1] and `GKArray` [2]. Both sketches are mergeable, meaning that multiple sketches from distributed systems can be combined in a central node.
3+
This repo contains Java implementations of the distributed quantile sketch algorithm `DDSketch` [1]. DDSketch is mergeable, meaning that multiple sketches from distributed systems can be combined in a central node.
44

55
# Quick start guide
66

@@ -40,12 +40,5 @@ The size of the sketch can be upper-bounded by using collapsing stores. For inst
4040

4141
The memory size of the sketch depends on the range that is covered by the input values: the larger that range, the more bins are needed to keep track of the input values. As a rough estimate, if working on durations using `DDSketches.unboundedDense(0.02)` (relative accuracy of 2%), about 2kB (275 bins) are needed to cover values between 1 millisecond and 1 minute, and about 6kB (802 bins) to cover values between 1 nanosecond and 1 day. The number of bins that are maintained can be upper-bounded using collapsing stores (see for example `DDSketches.collapsingLowestDense()` and `DDSketches.collapsingHighestDense()`).
4242

43-
# GKArray
44-
45-
GKArray is a sketch with rank error guarantees. Refer to [2] for more details.
46-
4743
# References
4844
[1] Charles Masson, Jee E. Rim and Homin K. Lee. DDSketch: A Fast and Fully-Mergeable Quantile Sketch with Relative-Error Guarantees. 2019.
49-
50-
[2] Michael B. Greenwald and Sanjeev Khanna. Space-efficient online computation of quantile summaries. In Proc. 2001 ACM
51-
SIGMOD International Conference on Management of Data, SIGMOD ’01, pages 58–66. ACM, 2001.

src/main/java/com/datadoghq/sketch/QuantileSketch.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ public interface QuantileSketch<QS extends QuantileSketch<QS>> extends DoubleCon
2323
void accept(double value);
2424

2525
/**
26-
* Adds a value to the sketch as many times as specified by {@code count}.
26+
* Adds a value to the sketch with a floating-point {@code count}.
27+
*
28+
* <p>If {@code count} is an integer, calling {@code accept(value, count)} is equivalent to calling
29+
* {@code accept(value)} {@code count} times.
2730
*
2831
* @param value the value to be added
29-
* @param count the number of times the value is to be added
32+
* @param count the weight associated with the value to be added
3033
* @throws IllegalArgumentException if {@code count} is negative
3134
*/
32-
void accept(double value, long count);
35+
void accept(double value, double count);
3336

3437
/**
3538
* Merges the other sketch into this one. After this operation, this sketch encodes the values that were added to

src/main/java/com/datadoghq/sketch/ddsketch/DDSketch.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,6 @@ public void accept(double value) {
186186
* @throws IllegalArgumentException if the value is outside the range that is tracked by the sketch
187187
*/
188188
@Override
189-
public void accept(double value, long count) {
190-
accept(value, (double) count);
191-
}
192-
193-
/**
194-
* Adds a value to the sketch with a floating-point {@code count}.
195-
*
196-
* @param value the value to be added
197-
* @param count the weight associated with the value to be added
198-
* @throws IllegalArgumentException if {@code count} is negative
199-
*/
200189
public void accept(double value, double count) {
201190

202191
checkValueTrackable(value);

src/main/java/com/datadoghq/sketch/gk/GKArray.java

Lines changed: 0 additions & 301 deletions
This file was deleted.

0 commit comments

Comments
 (0)