From a996ed2b8ab12a92f1fea7a6545becf7912ddf84 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 19 Apr 2022 22:02:46 -0700 Subject: [PATCH] Remove hppc from percentiles agg The percentiles bucket agg uses an hppc arraylist of doubles to store the parsed percent values. This is a very small list and does not need to be a native array. This commit changes to using a standard ArrayList. relates #84735 --- .../PercentilesBucketPipelineAggregationBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketPipelineAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketPipelineAggregationBuilder.java index af3bf418ed150..cb0c6310a6783 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketPipelineAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketPipelineAggregationBuilder.java @@ -8,8 +8,6 @@ package org.elasticsearch.search.aggregations.pipeline; -import com.carrotsearch.hppc.DoubleArrayList; - import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -18,7 +16,9 @@ import org.elasticsearch.xcontent.XContentParser; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -152,7 +152,7 @@ protected PercentilesBucketPipelineAggregationBuilder buildFactory( protected boolean token(XContentParser parser, String field, XContentParser.Token token, Map params) throws IOException { if (PERCENTS_FIELD.match(field, parser.getDeprecationHandler()) && token == XContentParser.Token.START_ARRAY) { - DoubleArrayList percents = new DoubleArrayList(10); + List percents = new ArrayList<>(10); while (parser.nextToken() != XContentParser.Token.END_ARRAY) { percents.add(parser.doubleValue()); }