diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 3fe2043ac98..59f5a722a1d 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -297,6 +297,8 @@ Other * LUCENE-9391: Upgrade HPPC to 0.8.2. (Haoyu Zhai) +* LUCENE-10021: Upgrade HPPC to 0.9.0. Replace usage of ...ScatterMap to ...HashMap. (Patrick Zhai) + * LUCENE-8768: Fix Javadocs build in Java 11. (Namgyu Kim) * LUCENE-9092: upgrade randomizedtesting to 2.7.5 (Dawid Weiss) diff --git a/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java b/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java index 44f2dabd694..71ec7cad883 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java @@ -17,7 +17,7 @@ package org.apache.lucene.facet; -import com.carrotsearch.hppc.LongIntScatterMap; +import com.carrotsearch.hppc.LongIntHashMap; import com.carrotsearch.hppc.cursors.LongIntCursor; import java.io.IOException; import java.util.ArrayList; @@ -52,7 +52,7 @@ public class LongValueFacetCounts extends Facets { private final int[] counts = new int[1024]; /** Used for all values that are >= 1K. */ - private final LongIntScatterMap hashCounts = new LongIntScatterMap(); + private final LongIntHashMap hashCounts = new LongIntHashMap(); /** Field being counted. */ private final String field; diff --git a/lucene/facet/src/java/org/apache/lucene/facet/StringValueFacetCounts.java b/lucene/facet/src/java/org/apache/lucene/facet/StringValueFacetCounts.java index 1c66042c9ff..bf51e30dbc8 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/StringValueFacetCounts.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/StringValueFacetCounts.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.facet; -import com.carrotsearch.hppc.IntIntScatterMap; +import com.carrotsearch.hppc.IntIntHashMap; import com.carrotsearch.hppc.cursors.IntIntCursor; import java.io.IOException; import java.util.Arrays; @@ -67,7 +67,7 @@ public class StringValueFacetCounts extends Facets { private final SortedSetDocValues docValues; private final int[] denseCounts; - private final IntIntScatterMap sparseCounts; + private final IntIntHashMap sparseCounts; private final int cardinality; private int totalDocCount; @@ -110,7 +110,7 @@ public class StringValueFacetCounts extends Facets { // If our result set is < 10% of the index, we collect sparsely (use hash map). This // heuristic is borrowed from IntTaxonomyFacetCounts: if (totalHits < totalDocs / 10) { - sparseCounts = new IntIntScatterMap(); + sparseCounts = new IntIntHashMap(); denseCounts = null; } else { sparseCounts = null; diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java index 7d4e5d6149c..fc7124f686d 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java @@ -16,7 +16,7 @@ */ package org.apache.lucene.facet.taxonomy; -import com.carrotsearch.hppc.IntIntScatterMap; +import com.carrotsearch.hppc.IntIntHashMap; import com.carrotsearch.hppc.cursors.IntIntCursor; import java.io.IOException; import java.util.Map; @@ -34,7 +34,7 @@ public abstract class IntTaxonomyFacets extends TaxonomyFacets { /** Per-ordinal value. */ private final int[] values; - private final IntIntScatterMap sparseValues; + private final IntIntHashMap sparseValues; /** Sole constructor. */ protected IntTaxonomyFacets( @@ -43,7 +43,7 @@ public abstract class IntTaxonomyFacets extends TaxonomyFacets { super(indexFieldName, taxoReader, config); if (useHashTable(fc, taxoReader)) { - sparseValues = new IntIntScatterMap(); + sparseValues = new IntIntHashMap(); values = null; } else { sparseValues = null; diff --git a/lucene/licenses/hppc-0.8.2.jar.sha1 b/lucene/licenses/hppc-0.8.2.jar.sha1 deleted file mode 100644 index a73358b9c66..00000000000 --- a/lucene/licenses/hppc-0.8.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ccb3ef933ead6b5d766fa571582ddb9b447e48c4 diff --git a/lucene/licenses/hppc-0.9.0.jar.sha1 b/lucene/licenses/hppc-0.9.0.jar.sha1 new file mode 100644 index 00000000000..0cd847ea7e9 --- /dev/null +++ b/lucene/licenses/hppc-0.9.0.jar.sha1 @@ -0,0 +1 @@ +fcc952fb6d378266b943bef9f15e67a4d45cfa88 diff --git a/versions.lock b/versions.lock index 5bfeac5561a..af19c24c0fa 100644 --- a/versions.lock +++ b/versions.lock @@ -1,5 +1,5 @@ # Run ./gradlew --write-locks to regenerate this file -com.carrotsearch:hppc:0.8.2 (1 constraints: 0c050536) +com.carrotsearch:hppc:0.9.0 (1 constraints: 0b050636) com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.7.6 (1 constraints: 11051036) com.ibm.icu:icu4j:68.2 (1 constraints: e4041f31) commons-codec:commons-codec:1.13 (1 constraints: d904f430) diff --git a/versions.props b/versions.props index 4b5a2c239d0..201f436ed95 100644 --- a/versions.props +++ b/versions.props @@ -1,5 +1,5 @@ com.carrotsearch.randomizedtesting:*=2.7.6 -com.carrotsearch:hppc=0.8.2 +com.carrotsearch:hppc=0.9.0 com.github.ben-manes.caffeine:caffeine=2.8.4 com.google.errorprone:*=2.4.0 com.google.guava:guava=25.1-jre