Skip to content
Open
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
4 changes: 2 additions & 2 deletions drift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.11.0</version>
<version>3.5.1</version>
<executions>
<execution>
<id>help-mojo</id>
Expand All @@ -357,7 +357,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.1.0</version>
</plugin>

<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testConnectTimeout()
super.testConnectTimeout();
}

@Test(expectedExceptions = IOException.class)
@Test(expectedExceptions = {IOException.class})
public void testCertHostnameMismatch()
throws Exception
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>com.facebook.airlift</groupId>
<artifactId>airbase</artifactId>
<version>109</version>
<version>108</version>
</parent>

<inceptionYear>2010</inceptionYear>
Expand Down
3 changes: 1 addition & 2 deletions stats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@
<dependency>
<groupId>io.airlift</groupId>
<artifactId>slice</artifactId>
<version>0.45</version>
</dependency>

<dependency>
<groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId>
<version>0.17</version>
<version>0.2</version>
</dependency>

<!-- for testing -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
public class QuantileDigest
{
private static final int MAX_BITS = 64;
private static final long QUANTILE_DIGEST_SIZE = ClassLayout.parseClass(QuantileDigest.class).instanceSize();
private static final int QUANTILE_DIGEST_SIZE = ClassLayout.parseClass(QuantileDigest.class).instanceSize();

// needs to be such that Math.exp(alpha * seconds) does not grow too big
static final long RESCALE_THRESHOLD_SECONDS = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final class DenseHll
private static final int MAX_DELTA = (1 << BITS_PER_BUCKET) - 1;
private static final int BUCKET_MASK = (1 << BITS_PER_BUCKET) - 1;

private static final long DENSE_INSTANCE_SIZE = ClassLayout.parseClass(DenseHll.class).instanceSize();
private static final int DENSE_INSTANCE_SIZE = ClassLayout.parseClass(DenseHll.class).instanceSize();
private static final int OVERFLOW_GROW_INCREMENT = 5;

private final byte indexBitLength;
Expand Down Expand Up @@ -148,9 +148,9 @@ public void insertHash(long hash)
}

@Override
public long estimatedInMemorySize()
public int estimatedInMemorySize()
{
return (DENSE_INSTANCE_SIZE +
return (int) (DENSE_INSTANCE_SIZE +
SizeOf.sizeOf(deltas) +
SizeOf.sizeOf(overflowBuckets) +
SizeOf.sizeOf(overflowValues));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface HllInstance

int getIndexBitLength();

long estimatedInMemorySize();
int estimatedInMemorySize();

int estimatedSerializedSize();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class HyperLogLog
{
private static final long INSTANCE_SIZE = ClassLayout.parseClass(HyperLogLog.class).instanceSize();
private static final int INSTANCE_SIZE = ClassLayout.parseClass(HyperLogLog.class).instanceSize();
private static final int MAX_NUMBER_OF_BUCKETS = 65536;
private HllInstance instance;

Expand Down Expand Up @@ -106,7 +106,7 @@ public void eachBucket(BucketListener listener)
instance.eachBucket(listener);
}

public long estimatedInMemorySize()
public int estimatedInMemorySize()
{
return instance.estimatedInMemorySize() + INSTANCE_SIZE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
final class SparseHll
implements HllInstance
{
private static final long SPARSE_INSTANCE_SIZE = ClassLayout.parseClass(SparseHll.class).instanceSize();
private static final int SPARSE_INSTANCE_SIZE = ClassLayout.parseClass(SparseHll.class).instanceSize();

// 6 bits to encode the number of zeros after the truncated hash
// and be able to fit the encoded value in an integer
Expand Down Expand Up @@ -192,7 +192,7 @@ public long cardinality()
}

@Override
public long estimatedInMemorySize()
public int estimatedInMemorySize()
{
return SPARSE_INSTANCE_SIZE + toIntExact(sizeOf(entries));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class TestSparseHll
{
private static final long SPARSE_HLL_INSTANCE_SIZE = ClassLayout.parseClass(SparseHll.class).instanceSize();
private static final int SPARSE_HLL_INSTANCE_SIZE = ClassLayout.parseClass(SparseHll.class).instanceSize();

@Test(dataProvider = "bits")
public void testNumberOfZeros(int indexBitLength)
Expand Down
Loading