Skip to content

Commit

Permalink
Fix test failure in TestHistogramCollectorManager
Browse files Browse the repository at this point in the history
  • Loading branch information
jpountz committed Feb 21, 2025
1 parent 5491c94 commit e779e55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void finish() throws IOException {
}
}

private static void checkMaxBuckets(int size, int maxBuckets) {
static void checkMaxBuckets(int size, int maxBuckets) {
if (size > maxBuckets) {
throw new IllegalStateException(
"Collected "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public LongIntHashMap reduce(Collection<HistogramCollector> collectors) throws I
for (HistogramCollector collector : collectors) {
for (LongIntCursor cursor : collector.getCounts()) {
reduced.addTo(cursor.key, cursor.value);
HistogramCollector.checkMaxBuckets(reduced.size(), maxBuckets);
}
}
return reduced;
Expand Down

0 comments on commit e779e55

Please sign in to comment.