You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/07/13 12:38:52 UTC
[lucene] branch main updated: LUCENE-10021: Upgrade HPPC to 0.9.0.
Replace usage of ...ScatterMap to ...HashMap (#209)
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new caa822f LUCENE-10021: Upgrade HPPC to 0.9.0. Replace usage of ...ScatterMap to ...HashMap (#209)
caa822f is described below
commit caa822ff38ab1b1e48b930aff28d5bd18c6eea93
Author: Patrick Zhai <zh...@users.noreply.github.com>
AuthorDate: Tue Jul 13 05:38:46 2021 -0700
LUCENE-10021: Upgrade HPPC to 0.9.0. Replace usage of ...ScatterMap to ...HashMap (#209)
---
lucene/CHANGES.txt | 2 ++
.../src/java/org/apache/lucene/facet/LongValueFacetCounts.java | 4 ++--
.../src/java/org/apache/lucene/facet/StringValueFacetCounts.java | 6 +++---
.../java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java | 6 +++---
lucene/licenses/hppc-0.8.2.jar.sha1 | 1 -
lucene/licenses/hppc-0.9.0.jar.sha1 | 1 +
versions.lock | 2 +-
versions.props | 2 +-
8 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 3fe2043..59f5a72 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 44f2dab..71ec7ca 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 1c66042..bf51e30 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 7d4e5d6..fc7124f 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 a73358b..0000000
--- 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 0000000..0cd847e
--- /dev/null
+++ b/lucene/licenses/hppc-0.9.0.jar.sha1
@@ -0,0 +1 @@
+fcc952fb6d378266b943bef9f15e67a4d45cfa88
diff --git a/versions.lock b/versions.lock
index 5bfeac5..af19c24 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 4b5a2c2..201f436 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