Skip to content

Commit ba627f6

Browse files
committed
More renaming
1 parent 8322905 commit ba627f6

File tree

66 files changed

+73
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+73
-83
lines changed

modules/aggs-matrix-stats/src/main/java/org/elasticsearch/search/aggregations/matrix/stats/InternalMatrixStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public Object getProperty(List<String> path) {
233233
}
234234

235235
@Override
236-
public InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
236+
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
237237
// merge stats across all shards
238238
List<InternalAggregation> aggs = new ArrayList<>(aggregations);
239239
aggs.removeIf(p -> ((InternalMatrixStats)p).stats == null);

modules/aggs-matrix-stats/src/test/java/org/elasticsearch/search/aggregations/matrix/stats/InternalMatrixStatsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void testReduceRandom() {
164164
MockBigArrays bigArrays = new MockBigArrays(new MockPageCacheRecycler(Settings.EMPTY), new NoneCircuitBreakerService());
165165
InternalAggregation.ReduceContext context =
166166
new InternalAggregation.ReduceContext(bigArrays, mockScriptService, true);
167-
InternalMatrixStats reduced = (InternalMatrixStats) shardResults.get(0).reduce(shardResults, context);
167+
InternalMatrixStats reduced = (InternalMatrixStats) shardResults.get(0).doReduce(shardResults, context);
168168
multiPassStats.assertNearlyEqual(reduced.getResults());
169169
}
170170

server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public InternalAggregation reducePipelines(InternalAggregation reducedAggs, Redu
144144
* try reusing an existing instance (typically the first in the given list) to save on redundant object
145145
* construction.
146146
*/
147-
public abstract InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext);
147+
public abstract InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext);
148148

149149
/**
150150
* Return true if this aggregation is mapped, and can lead a reduction. If this agg returns

server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static InternalAggregations reduce(List<InternalAggregations> aggregation
158158
// If all aggs are unmapped, the agg that leads the reduction will just return itself
159159
aggregations.sort(INTERNAL_AGG_COMPARATOR);
160160
InternalAggregation first = aggregations.get(0); // the list can't be empty as it's created on demand
161-
reducedAggregations.add(first.reduce(aggregations, context));
161+
reducedAggregations.add(first.doReduce(aggregations, context));
162162
}
163163

164164
return new InternalAggregations(reducedAggregations, topLevelPipelineAggregators);

server/src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.util.ArrayList;
3030
import java.util.List;
3131
import java.util.Map;
32-
import java.util.stream.Collectors;
3332

3433
public abstract class InternalMultiBucketAggregation<A extends InternalMultiBucketAggregation,
3534
B extends InternalMultiBucketAggregation.InternalBucket>

server/src/main/java/org/elasticsearch/search/aggregations/MultiBucketConsumerService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/**
3434
* An aggregation service that creates instances of {@link MultiBucketConsumer}.
3535
* The consumer is used by {@link BucketsAggregator} and {@link InternalMultiBucketAggregation} to limit the number of buckets created
36-
* in {@link Aggregator#buildAggregation} and {@link InternalAggregation#reduce}.
36+
* in {@link Aggregator#buildAggregation} and {@link InternalAggregation#doReduce}.
3737
* The limit can be set by changing the `search.max_buckets` cluster setting and defaults to 10000.
3838
*/
3939
public class MultiBucketConsumerService {
@@ -90,7 +90,7 @@ protected void metadataToXContent(XContentBuilder builder, Params params) throws
9090
* An {@link IntConsumer} that throws a {@link TooManyBucketsException}
9191
* when the sum of the provided values is above the limit (`search.max_buckets`).
9292
* It is used by aggregators to limit the number of bucket creation during
93-
* {@link Aggregator#buildAggregation} and {@link InternalAggregation#reduce}.
93+
* {@link Aggregator#buildAggregation} and {@link InternalAggregation#doReduce}.
9494
*/
9595
public static class MultiBucketConsumer implements IntConsumer {
9696
private final int limit;

server/src/main/java/org/elasticsearch/search/aggregations/bucket/InternalSingleBucketAggregation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public InternalSingleBucketAggregation create(InternalAggregations subAggregatio
9797
protected abstract InternalSingleBucketAggregation newAggregation(String name, long docCount, InternalAggregations subAggregations);
9898

9999
@Override
100-
public InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
100+
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
101101
long docCount = 0L;
102102
List<InternalAggregations> subAggregationsList = new ArrayList<>(aggregations.size());
103103
for (InternalAggregation aggregation : aggregations) {

server/src/main/java/org/elasticsearch/search/aggregations/bucket/adjacency/InternalAdjacencyMatrix.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public InternalBucket getBucketByKey(String key) {
181181
}
182182

183183
@Override
184-
public InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
184+
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
185185
Map<String, List<InternalBucket>> bucketsMap = new HashMap<>();
186186
for (InternalAggregation aggregation : aggregations) {
187187
InternalAdjacencyMatrix filters = (InternalAdjacencyMatrix) aggregation;

server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int[] getReverseMuls() {
143143
}
144144

145145
@Override
146-
public InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
146+
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
147147
PriorityQueue<BucketIterator> pq = new PriorityQueue<>(aggregations.size());
148148
for (InternalAggregation agg : aggregations) {
149149
InternalComposite sortedAgg = (InternalComposite) agg;

server/src/main/java/org/elasticsearch/search/aggregations/bucket/filter/InternalFilters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public InternalBucket getBucketByKey(String key) {
189189
}
190190

191191
@Override
192-
public InternalAggregation reduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
192+
public InternalAggregation doReduce(List<InternalAggregation> aggregations, ReduceContext reduceContext) {
193193
List<List<InternalBucket>> bucketsList = null;
194194
for (InternalAggregation aggregation : aggregations) {
195195
InternalFilters filters = (InternalFilters) aggregation;

0 commit comments

Comments
 (0)