Skip to content

Commit

Permalink
Remove spotless exclusion for HyperLogLogPlusPlus (#5225)
Browse files Browse the repository at this point in the history
The large data tables necessitating this exclusion were refactored away
a long time ago.

Signed-off-by: Andrew Ross <andrross@amazon.com>
  • Loading branch information
andrross authored Nov 14, 2022
1 parent 831b3a0 commit 671820d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
16 changes: 0 additions & 16 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,6 @@ tasks.named("internalClusterTest").configure {
jvmArgs -= '-XX:TieredStopAtLevel=1'
}

// Until this project is always being formatted with spotless, we need to
// guard against `spotless()` not existing.
try {
spotless {
java {
// Contains large data tables that do not format well.
targetExclude 'src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlus.java'
}
}
}
catch (Exception e) {
if (e.getMessage().contains("Could not find method spotless") == false) {
throw e;
}
}

tasks.named("forbiddenPatterns").configure {
exclude '**/*.json'
exclude '**/*.jmx'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,9 @@ private static class HyperLogLog extends AbstractHyperLogLog implements Releasab
// array for holding the runlens.
private ByteArray runLens;


HyperLogLog(BigArrays bigArrays, long initialBucketCount, int precision) {
super(precision);
this.runLens = bigArrays.newByteArray(initialBucketCount << precision);
this.runLens = bigArrays.newByteArray(initialBucketCount << precision);
this.bigArrays = bigArrays;
this.iterator = new HyperLogLogIterator(this, precision, m);
}
Expand Down

0 comments on commit 671820d

Please sign in to comment.