diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/datastream/CreateDataStreamAction.java b/server/src/main/java/org/elasticsearch/action/admin/indices/datastream/CreateDataStreamAction.java index a305e294fc4..b43aaf20b90 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/datastream/CreateDataStreamAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/datastream/CreateDataStreamAction.java @@ -124,9 +124,9 @@ public class CreateDataStreamAction extends ActionType { @Inject public TransportAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, - MetadataCreateIndexService metaDataCreateIndexService) { + MetadataCreateIndexService metadataCreateIndexService) { super(NAME, transportService, clusterService, threadPool, actionFilters, Request::new, indexNameExpressionResolver); - this.metadataCreateIndexService = metaDataCreateIndexService; + this.metadataCreateIndexService = metadataCreateIndexService; } @Override diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractPercentilesAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractPercentilesAggregationBuilder.java index dae008183f2..b62f3c7dc7b 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractPercentilesAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractPercentilesAggregationBuilder.java @@ -135,8 +135,8 @@ public abstract class AbstractPercentilesAggregationBuilder clone, - AggregatorFactories.Builder factoriesBuilder, Map metaData) { - super(clone, factoriesBuilder, metaData); + AggregatorFactories.Builder factoriesBuilder, Map metadata) { + super(clone, factoriesBuilder, metadata); this.percentilesConfig = clone.percentilesConfig; this.keyed = clone.keyed; this.values = clone.values; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregationBuilder.java index a61e57bd628..794ece846fc 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregationBuilder.java @@ -65,13 +65,13 @@ public class PercentileRanksAggregationBuilder extends AbstractPercentilesAggreg private PercentileRanksAggregationBuilder(PercentileRanksAggregationBuilder clone, Builder factoriesBuilder, - Map metaData) { - super(clone, factoriesBuilder, metaData); + Map metadata) { + super(clone, factoriesBuilder, metadata); } @Override - protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map metaData) { - return new PercentileRanksAggregationBuilder(this, factoriesBuilder, metaData); + protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map metadata) { + return new PercentileRanksAggregationBuilder(this, factoriesBuilder, metadata); } /** diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregatorFactory.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregatorFactory.java index 99ddd0162be..1886a9e44d3 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregatorFactory.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentileRanksAggregatorFactory.java @@ -47,8 +47,8 @@ class PercentileRanksAggregatorFactory extends ValuesSourceAggregatorFactory metaData) throws IOException { - super(name, config, queryShardContext, parent, subFactoriesBuilder, metaData); + Map metadata) throws IOException { + super(name, config, queryShardContext, parent, subFactoriesBuilder, metadata); this.percents = percents; this.percentilesConfig = percentilesConfig; this.keyed = keyed; @@ -58,10 +58,10 @@ class PercentileRanksAggregatorFactory extends ValuesSourceAggregatorFactory pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return percentilesConfig.createPercentileRanksAggregator(name, null, searchContext, parent, percents, keyed, - config.format(), pipelineAggregators, metaData); + config.format(), pipelineAggregators, metadata); } @Override @@ -70,8 +70,8 @@ class PercentileRanksAggregatorFactory extends ValuesSourceAggregatorFactory pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return percentilesConfig.createPercentileRanksAggregator(name, valuesSource, searchContext, parent, percents, keyed, - config.format(), pipelineAggregators, metaData); + config.format(), pipelineAggregators, metadata); } } diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregationBuilder.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregationBuilder.java index ed69b796bec..5f4aa7a25c6 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregationBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregationBuilder.java @@ -74,13 +74,13 @@ public class PercentilesAggregationBuilder extends AbstractPercentilesAggregatio } protected PercentilesAggregationBuilder(PercentilesAggregationBuilder clone, - Builder factoriesBuilder, Map metaData) { - super(clone, factoriesBuilder, metaData); + Builder factoriesBuilder, Map metadata) { + super(clone, factoriesBuilder, metadata); } @Override - protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map metaData) { - return new PercentilesAggregationBuilder(this, factoriesBuilder, metaData); + protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map metadata) { + return new PercentilesAggregationBuilder(this, factoriesBuilder, metadata); } /** diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregatorFactory.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregatorFactory.java index 570125f3ea1..f7e773c91e3 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregatorFactory.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesAggregatorFactory.java @@ -46,8 +46,8 @@ class PercentilesAggregatorFactory extends ValuesSourceAggregatorFactory config, double[] percents, PercentilesConfig percentilesConfig, boolean keyed, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, - Map metaData) throws IOException { - super(name, config, queryShardContext, parent, subFactoriesBuilder, metaData); + Map metadata) throws IOException { + super(name, config, queryShardContext, parent, subFactoriesBuilder, metadata); this.percents = percents; this.percentilesConfig = percentilesConfig; this.keyed = keyed; @@ -57,10 +57,10 @@ class PercentilesAggregatorFactory extends ValuesSourceAggregatorFactory pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return percentilesConfig.createPercentilesAggregator(name, null, searchContext, parent, percents, keyed, - config.format(), pipelineAggregators, metaData); + config.format(), pipelineAggregators, metadata); } @Override @@ -69,9 +69,9 @@ class PercentilesAggregatorFactory extends ValuesSourceAggregatorFactory pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return percentilesConfig.createPercentilesAggregator(name, valuesSource, searchContext, parent, percents, keyed, - config.format(), pipelineAggregators, metaData); + config.format(), pipelineAggregators, metadata); } } diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesConfig.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesConfig.java index af7f9ed5ec4..e9519b8e690 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesConfig.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/PercentilesConfig.java @@ -72,12 +72,12 @@ public abstract class PercentilesConfig implements ToXContent, Writeable { abstract Aggregator createPercentilesAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException; + Map metadata) throws IOException; abstract Aggregator createPercentileRanksAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException; + Map metadata) throws IOException; @Override public void writeTo(StreamOutput out) throws IOException { @@ -131,18 +131,18 @@ public abstract class PercentilesConfig implements ToXContent, Writeable { Aggregator createPercentilesAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return new TDigestPercentilesAggregator(name, valuesSource, context, parent, values, compression, keyed, formatter, - pipelineAggregators, metaData); + pipelineAggregators, metadata); } @Override Aggregator createPercentileRanksAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return new TDigestPercentileRanksAggregator(name, valuesSource, context, parent, values, compression, keyed, - formatter, pipelineAggregators, metaData); + formatter, pipelineAggregators, metadata); } @Override @@ -207,18 +207,18 @@ public abstract class PercentilesConfig implements ToXContent, Writeable { Aggregator createPercentilesAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return new HDRPercentilesAggregator(name, valuesSource, context, parent, values, numberOfSignificantValueDigits, keyed, - formatter, pipelineAggregators, metaData); + formatter, pipelineAggregators, metadata); } @Override Aggregator createPercentileRanksAggregator(String name, ValuesSource valuesSource, SearchContext context, Aggregator parent, double[] values, boolean keyed, DocValueFormat formatter, List pipelineAggregators, - Map metaData) throws IOException { + Map metadata) throws IOException { return new HDRPercentileRanksAggregator(name, valuesSource, context, parent, values, numberOfSignificantValueDigits, keyed, - formatter, pipelineAggregators, metaData); + formatter, pipelineAggregators, metadata); } @Override diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalPercentilesBucketTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalPercentilesBucketTests.java index dff1c455e97..7a4a97daae9 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalPercentilesBucketTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalPercentilesBucketTests.java @@ -46,17 +46,17 @@ import static org.hamcrest.Matchers.equalTo; public class InternalPercentilesBucketTests extends InternalAggregationTestCase { @Override - protected InternalPercentilesBucket createTestInstance(String name, Map metaData) { - return createTestInstance(name, metaData, randomPercents(), true); + protected InternalPercentilesBucket createTestInstance(String name, Map metadata) { + return createTestInstance(name, metadata, randomPercents(), true); } - private static InternalPercentilesBucket createTestInstance(String name, Map metaData, + private static InternalPercentilesBucket createTestInstance(String name, Map metadata, double[] percents, boolean keyed) { final double[] percentiles = new double[percents.length]; for (int i = 0; i < percents.length; ++i) { percentiles[i] = frequently() ? randomDouble() : Double.NaN; } - return createTestInstance(name, metaData, percents, percentiles, keyed); + return createTestInstance(name, metadata, percents, percentiles, keyed); } private static InternalPercentilesBucket createTestInstance(String name, Map metadata, diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java index 5a00c7e863c..72f8c3e5425 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java @@ -353,8 +353,8 @@ public abstract class InternalAggregationTestCase /** Return an instance on an unmapped field. */ protected final T createUnmappedInstance(String name) { Map metadata = new HashMap<>(); - int metaDataCount = randomBoolean() ? 0 : between(1, 10); - while (metadata.size() < metaDataCount) { + int metadataCount = randomBoolean() ? 0 : between(1, 10); + while (metadata.size() < metadataCount) { metadata.put(randomAlphaOfLength(5), randomAlphaOfLength(5)); } return createUnmappedInstance(name, metadata);